summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/lzma/C/XzEnc.h
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/lzma/C/XzEnc.h')
-rw-r--r--3rdparty/lzma/C/XzEnc.h38
1 files changed, 30 insertions, 8 deletions
diff --git a/3rdparty/lzma/C/XzEnc.h b/3rdparty/lzma/C/XzEnc.h
index c3c19eca008..77b78c014be 100644
--- a/3rdparty/lzma/C/XzEnc.h
+++ b/3rdparty/lzma/C/XzEnc.h
@@ -1,8 +1,8 @@
/* XzEnc.h -- Xz Encode
-2011-02-07 : Igor Pavlov : Public domain */
+2023-04-13 : Igor Pavlov : Public domain */
-#ifndef __XZ_ENC_H
-#define __XZ_ENC_H
+#ifndef ZIP7_INC_XZ_ENC_H
+#define ZIP7_INC_XZ_ENC_H
#include "Lzma2Enc.h"
@@ -10,6 +10,11 @@
EXTERN_C_BEGIN
+
+#define XZ_PROPS_BLOCK_SIZE_AUTO LZMA2_ENC_PROPS_BLOCK_SIZE_AUTO
+#define XZ_PROPS_BLOCK_SIZE_SOLID LZMA2_ENC_PROPS_BLOCK_SIZE_SOLID
+
+
typedef struct
{
UInt32 id;
@@ -20,19 +25,36 @@ typedef struct
void XzFilterProps_Init(CXzFilterProps *p);
+
typedef struct
{
- const CLzma2EncProps *lzma2Props;
- const CXzFilterProps *filterProps;
+ CLzma2EncProps lzma2Props;
+ CXzFilterProps filterProps;
unsigned checkId;
+ UInt64 blockSize;
+ int numBlockThreads_Reduced;
+ int numBlockThreads_Max;
+ int numTotalThreads;
+ int forceWriteSizesInHeader;
+ UInt64 reduceSize;
} CXzProps;
void XzProps_Init(CXzProps *p);
-SRes Xz_Encode(ISeqOutStream *outStream, ISeqInStream *inStream,
- const CXzProps *props, ICompressProgress *progress);
+typedef struct CXzEnc CXzEnc;
+typedef CXzEnc * CXzEncHandle;
+// Z7_DECLARE_HANDLE(CXzEncHandle)
+
+CXzEncHandle XzEnc_Create(ISzAllocPtr alloc, ISzAllocPtr allocBig);
+void XzEnc_Destroy(CXzEncHandle p);
+SRes XzEnc_SetProps(CXzEncHandle p, const CXzProps *props);
+void XzEnc_SetDataSize(CXzEncHandle p, UInt64 expectedDataSiize);
+SRes XzEnc_Encode(CXzEncHandle p, ISeqOutStreamPtr outStream, ISeqInStreamPtr inStream, ICompressProgressPtr progress);
+
+SRes Xz_Encode(ISeqOutStreamPtr outStream, ISeqInStreamPtr inStream,
+ const CXzProps *props, ICompressProgressPtr progress);
-SRes Xz_EncodeEmpty(ISeqOutStream *outStream);
+SRes Xz_EncodeEmpty(ISeqOutStreamPtr outStream);
EXTERN_C_END