LzmaTools.h 980 B

12345678910111213141516171819202122232425262728293031
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Usefuls routines based on the LzmaTest.c file from LZMA SDK 4.65
  4. *
  5. * Copyright (C) 2007-2008 Industrie Dial Face S.p.A.
  6. * Luigi 'Comio' Mantellini (luigi.mantellini@idf-hit.com)
  7. *
  8. * Copyright (C) 1999-2005 Igor Pavlov
  9. */
  10. #ifndef __LZMA_TOOL_H__
  11. #define __LZMA_TOOL_H__
  12. #include <lzma/LzmaTypes.h>
  13. /**
  14. * lzmaBuffToBuffDecompress() - Decompress LZMA data
  15. *
  16. * @outStream: output buffer
  17. * @uncompressedSize: On entry, the mnaximum uncompressed size of the data;
  18. * on exit, the actual uncompressed size after processing
  19. * @inStream: Compressed bytes to decompress
  20. * @length: Sizeof @inStream
  21. * @return 0 if OK, SZ_ERROR_DATA if the data is in a format that cannot be
  22. * decompressed; SZ_ERROR_OUTPUT_EOF if *uncompressedSize is too small;
  23. * see also other SZ_ERROR... values
  24. */
  25. int lzmaBuffToBuffDecompress(unsigned char *outStream, SizeT *uncompressedSize,
  26. const unsigned char *inStream, SizeT length);
  27. #endif