all repos — mgba @ b2d406a411b31acce5bbf0246af32a80c22ca834

mGBA Game Boy Advance Emulator

src/third-party/lzma/XzEnc.h (view raw)

 1/* XzEnc.h -- Xz Encode
 22017-06-27 : Igor Pavlov : Public domain */
 3
 4#ifndef __XZ_ENC_H
 5#define __XZ_ENC_H
 6
 7#include "Lzma2Enc.h"
 8
 9#include "Xz.h"
10
11EXTERN_C_BEGIN
12
13
14#define XZ_PROPS__BLOCK_SIZE__AUTO   LZMA2_ENC_PROPS__BLOCK_SIZE__AUTO
15#define XZ_PROPS__BLOCK_SIZE__SOLID  LZMA2_ENC_PROPS__BLOCK_SIZE__SOLID
16
17
18typedef struct
19{
20  UInt32 id;
21  UInt32 delta;
22  UInt32 ip;
23  int ipDefined;
24} CXzFilterProps;
25
26void XzFilterProps_Init(CXzFilterProps *p);
27
28
29typedef struct
30{
31  CLzma2EncProps lzma2Props;
32  CXzFilterProps filterProps;
33  unsigned checkId;
34  UInt64 blockSize;
35  int numBlockThreads_Reduced;
36  int numBlockThreads_Max;
37  int numTotalThreads;
38  int forceWriteSizesInHeader;
39  UInt64 reduceSize;
40} CXzProps;
41
42void XzProps_Init(CXzProps *p);
43
44
45typedef void * CXzEncHandle;
46
47CXzEncHandle XzEnc_Create(ISzAllocPtr alloc, ISzAllocPtr allocBig);
48void XzEnc_Destroy(CXzEncHandle p);
49SRes XzEnc_SetProps(CXzEncHandle p, const CXzProps *props);
50void XzEnc_SetDataSize(CXzEncHandle p, UInt64 expectedDataSiize);
51SRes XzEnc_Encode(CXzEncHandle p, ISeqOutStream *outStream, ISeqInStream *inStream, ICompressProgress *progress);
52
53SRes Xz_Encode(ISeqOutStream *outStream, ISeqInStream *inStream,
54    const CXzProps *props, ICompressProgress *progress);
55
56SRes Xz_EncodeEmpty(ISeqOutStream *outStream);
57
58EXTERN_C_END
59
60#endif