diff options
author | Igor Pavlov <87184205+ip7z@users.noreply.github.com> | 2021-12-27 00:00:00 +0000 |
---|---|---|
committer | Igor Pavlov <87184205+ip7z@users.noreply.github.com> | 2022-03-18 15:35:13 +0500 |
commit | f19f813537c7aea1c20749c914e756b54a9c3cf5 (patch) | |
tree | 816ba62ca7c0fa19f2eb46d9e9d6f7dd7c3a744d /C/XzEnc.h | |
parent | 98e06a519b63b81986abe76d28887f6984a7732b (diff) | |
download | 7zip-f19f813537c7aea1c20749c914e756b54a9c3cf5.tar.gz 7zip-f19f813537c7aea1c20749c914e756b54a9c3cf5.tar.bz2 7zip-f19f813537c7aea1c20749c914e756b54a9c3cf5.zip |
'21.07'21.07
Diffstat (limited to 'C/XzEnc.h')
-rw-r--r-- | C/XzEnc.h | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/C/XzEnc.h b/C/XzEnc.h new file mode 100644 index 0000000..0c29e7e --- /dev/null +++ b/C/XzEnc.h | |||
@@ -0,0 +1,60 @@ | |||
1 | /* XzEnc.h -- Xz Encode | ||
2 | 2017-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 | |||
11 | EXTERN_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 | |||
18 | typedef struct | ||
19 | { | ||
20 | UInt32 id; | ||
21 | UInt32 delta; | ||
22 | UInt32 ip; | ||
23 | int ipDefined; | ||
24 | } CXzFilterProps; | ||
25 | |||
26 | void XzFilterProps_Init(CXzFilterProps *p); | ||
27 | |||
28 | |||
29 | typedef 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 | |||
42 | void XzProps_Init(CXzProps *p); | ||
43 | |||
44 | |||
45 | typedef void * CXzEncHandle; | ||
46 | |||
47 | CXzEncHandle XzEnc_Create(ISzAllocPtr alloc, ISzAllocPtr allocBig); | ||
48 | void XzEnc_Destroy(CXzEncHandle p); | ||
49 | SRes XzEnc_SetProps(CXzEncHandle p, const CXzProps *props); | ||
50 | void XzEnc_SetDataSize(CXzEncHandle p, UInt64 expectedDataSiize); | ||
51 | SRes XzEnc_Encode(CXzEncHandle p, ISeqOutStream *outStream, ISeqInStream *inStream, ICompressProgress *progress); | ||
52 | |||
53 | SRes Xz_Encode(ISeqOutStream *outStream, ISeqInStream *inStream, | ||
54 | const CXzProps *props, ICompressProgress *progress); | ||
55 | |||
56 | SRes Xz_EncodeEmpty(ISeqOutStream *outStream); | ||
57 | |||
58 | EXTERN_C_END | ||
59 | |||
60 | #endif | ||