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.

71 lines
2.7 KiB

  1. //========= Copyright � 1996-2007, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: LZMA Glue. Designed for Tool time Encoding/Decoding.
  4. //
  5. // LZMA SDK 4.43 Copyright (c) 1999-2006 Igor Pavlov (2006-05-01)
  6. //
  7. // http://www.7-zip.org/
  8. //
  9. // LZMA SDK is licensed under two licenses:
  10. //
  11. // 1) GNU Lesser General Public License (GNU LGPL)
  12. // 2) Common Public License (CPL)
  13. //
  14. // It means that you can select one of these two licenses and
  15. // follow rules of that license.
  16. //
  17. // SPECIAL EXCEPTION:
  18. //
  19. // Igor Pavlov, as the author of this Code, expressly permits you to
  20. // statically or dynamically link your Code (or bind by name) to the
  21. // interfaces of this file without subjecting your linked Code to the
  22. // terms of the CPL or GNU LGPL. Any modifications or additions
  23. // to this file, however, are subject to the LGPL or CPL terms.
  24. //
  25. //====================================================================================//
  26. #ifndef LZMA_H
  27. #define LZMA_H
  28. #ifdef _WIN32
  29. #pragma once
  30. #endif
  31. // power of two, 256k
  32. #define LZMA_DEFAULT_DICTIONARY 18
  33. //-----------------------------------------------------------------------------
  34. // These routines are designed for TOOL TIME encoding/decoding on the PC!
  35. // They have not been made to encode/decode on the PPC and lack big endian awarnesss.
  36. // Lightweight GAME TIME Decoding is part of tier1.lib, via CLZMA.
  37. //-----------------------------------------------------------------------------
  38. //-----------------------------------------------------------------------------
  39. // Encoding glue. Returns non-null Compressed buffer if successful.
  40. // Caller must free.
  41. //-----------------------------------------------------------------------------
  42. unsigned char *LZMA_Compress(
  43. unsigned char *pInput,
  44. unsigned int inputSize,
  45. unsigned int *pOutputSize,
  46. unsigned int dictionarySize = LZMA_DEFAULT_DICTIONARY );
  47. //-----------------------------------------------------------------------------
  48. // Decoding glue. Returns TRUE if succesful.
  49. //-----------------------------------------------------------------------------
  50. bool LZMA_Uncompress(
  51. unsigned char *pInput,
  52. unsigned char **ppOutput,
  53. unsigned int *pOutputSize );
  54. //-----------------------------------------------------------------------------
  55. // Decoding helper, returns TRUE if buffer is LZMA compressed.
  56. //-----------------------------------------------------------------------------
  57. bool LZMA_IsCompressed( unsigned char *pInput );
  58. //-----------------------------------------------------------------------------
  59. // Decoding helper, returns non-zero size of data when uncompressed, otherwise 0.
  60. //-----------------------------------------------------------------------------
  61. unsigned int LZMA_GetActualSize( unsigned char *pInput );
  62. #endif