LzmaDecode.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. LzmaDecode.h
  3. LZMA Decoder interface
  4. LZMA SDK 4.05 Copyright (c) 1999-2004 Igor Pavlov (2004-08-25)
  5. Modifications for TIGCC Copyright (C) 2004 Kevin Kofler
  6. http://www.7-zip.org/
  7. LZMA SDK is licensed under two licenses:
  8. 1) GNU Lesser General Public License (GNU LGPL)
  9. 2) Common Public License (CPL)
  10. It means that you can select one of these two licenses and
  11. follow rules of that license.
  12. SPECIAL EXCEPTION:
  13. Igor Pavlov, as the author of this code, expressly permits you to
  14. statically or dynamically link your code (or bind by name) to the
  15. interfaces of this file without subjecting your linked code to the
  16. terms of the CPL or GNU LGPL. Any modifications or additions
  17. to this file, however, are subject to the LGPL or CPL terms.
  18. */
  19. #ifndef __LZMADECODE_H
  20. #define __LZMADECODE_H
  21. #define UInt32 unsigned long
  22. #define CProb unsigned short
  23. #define LZMA_RESULT_OK 0
  24. #define LZMA_RESULT_DATA_ERROR 1
  25. #define LZMA_RESULT_NOT_ENOUGH_MEM 2
  26. #define LZMA_BASE_SIZE 1062
  27. #define LZMA_LIT_SIZE 768
  28. /*
  29. bufferSize = (LZMA_BASE_SIZE + (LZMA_LIT_SIZE << (lc + lp)))* sizeof(CProb)
  30. bufferSize += 100 in case of _LZMA_OUT_READ
  31. by default CProb is unsigned short,
  32. but if specify _LZMA_PROB_32, CProb will be UInt32(unsigned int)
  33. */
  34. int LzmaDecode(
  35. unsigned char *inStream,
  36. unsigned char *outStream, UInt32 outSize);
  37. #endif