Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.1 KiB

  1. //========= Copyright � 1996-2007, Valve Corporation, All rights reserved. ============//
  2. //
  3. // LZMA Decoder. Designed for run time decoding.
  4. //
  5. // LZMA SDK 4.43 Copyright (c) 1999-2006 Igor Pavlov (2006-05-01)
  6. // http://www.7-zip.org/
  7. //
  8. //=====================================================================================//
  9. #ifndef _LZMADECODER_H
  10. #define _LZMADECODER_H
  11. #pragma once
  12. #if defined( _X360 ) || defined( _PS3 )
  13. #define LZMA_ID (('L'<<24)|('Z'<<16)|('M'<<8)|('A'))
  14. #else
  15. #define LZMA_ID (('A'<<24)|('M'<<16)|('Z'<<8)|('L'))
  16. #endif
  17. // bind the buffer for correct identification
  18. #pragma pack(1)
  19. struct lzma_header_t
  20. {
  21. unsigned int id;
  22. unsigned int actualSize; // always little endian
  23. unsigned int lzmaSize; // always little endian
  24. unsigned char properties[5];
  25. };
  26. #pragma pack()
  27. typedef void ( *LZMAReadProgressCallbackFunc_t )();
  28. class CLZMA
  29. {
  30. public:
  31. unsigned int Uncompress( unsigned char *pInput, unsigned char *pOutput, LZMAReadProgressCallbackFunc_t pCallback = NULL );
  32. bool IsCompressed( unsigned char *pInput );
  33. unsigned int GetActualSize( unsigned char *pInput );
  34. private:
  35. };
  36. #endif