7zExtract.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /* 7zExtract.h */
  2. #ifndef __7Z_EXTRACT_H
  3. #define __7Z_EXTRACT_H
  4. #include "7zIn.h"
  5. /*
  6. SzExtract extracts file from archive
  7. *outBuffer must be 0 before first call for each new archive.
  8. Extracting cache:
  9. If you need to decompress more than one file, you can send
  10. these values from previous call:
  11. *blockIndex,
  12. *outBuffer,
  13. *outBufferSize
  14. You can consider "*outBuffer" as cache of solid block. If your archive is solid,
  15. it will increase decompression speed.
  16. If you use external function, you can declare these 3 cache variables
  17. (blockIndex, outBuffer, outBufferSize) as static in that external function.
  18. Free *outBuffer and set *outBuffer to 0, if you want to flush cache.
  19. */
  20. SZ_RESULT SzExtract(
  21. ISzInStream *inStream,
  22. CArchiveDatabaseEx *db,
  23. UInt32 fileIndex, /* index of file */
  24. UInt32 *blockIndex, /* index of solid block */
  25. Byte **outBuffer, /* pointer to pointer to output buffer (allocated with allocMain) */
  26. size_t *outBufferSize, /* buffer size for output buffer */
  27. size_t *offset, /* offset of stream for required file in *outBuffer */
  28. size_t *outSizeProcessed, /* size of file in *outBuffer */
  29. ISzAlloc *allocMain,
  30. ISzAlloc *allocTemp);
  31. #endif