mirror of
https://github.com/1dot13/source.git
synced 2026-09-02 14:36:06 +02:00
- Virtual File System (VFS) by birdflu. This is needed for Multiplayer and is also used for Single Player. Very neat system :-) - Multiplayer Version 1.1 + some additional features and bugfixes * INFO: If you compile a new EXE and want to test, be sure to also use the latest SVN GameDir files in your JA2 install directory * git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@2961 3b4a5df2-a311-0410-b5c6-a8a6f20db521
42 lines
1.4 KiB
C
42 lines
1.4 KiB
C
/* 7zExtract.h -- Extracting from 7z archive
|
|
2008-11-23 : Igor Pavlov : Public domain */
|
|
|
|
#ifndef __7Z_EXTRACT_H
|
|
#define __7Z_EXTRACT_H
|
|
|
|
#include "7zIn.h"
|
|
|
|
/*
|
|
SzExtract extracts file from archive
|
|
|
|
*outBuffer must be 0 before first call for each new archive.
|
|
|
|
Extracting cache:
|
|
If you need to decompress more than one file, you can send
|
|
these values from previous call:
|
|
*blockIndex,
|
|
*outBuffer,
|
|
*outBufferSize
|
|
You can consider "*outBuffer" as cache of solid block. If your archive is solid,
|
|
it will increase decompression speed.
|
|
|
|
If you use external function, you can declare these 3 cache variables
|
|
(blockIndex, outBuffer, outBufferSize) as static in that external function.
|
|
|
|
Free *outBuffer and set *outBuffer to 0, if you want to flush cache.
|
|
*/
|
|
|
|
SRes SzAr_Extract(
|
|
const CSzArEx *db,
|
|
ILookInStream *inStream,
|
|
UInt32 fileIndex, /* index of file */
|
|
UInt32 *blockIndex, /* index of solid block */
|
|
Byte **outBuffer, /* pointer to pointer to output buffer (allocated with allocMain) */
|
|
size_t *outBufferSize, /* buffer size for output buffer */
|
|
size_t *offset, /* offset of stream for required file in *outBuffer */
|
|
size_t *outSizeProcessed, /* size of file in *outBuffer */
|
|
ISzAlloc *allocMain,
|
|
ISzAlloc *allocTemp);
|
|
|
|
#endif
|