summaryrefslogtreecommitdiffstats
path: root/other-licenses/7zstub/src/C/Lzma2Enc.h
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-03-25 17:53:14 +0100
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-03-25 17:53:14 +0100
commitf2902217b38cf2e16e851ae84d61247f8e828180 (patch)
tree0156a6db6aa8b4d87bf041ece5cf5229c59fe9de /other-licenses/7zstub/src/C/Lzma2Enc.h
parent917a2c450f08ab4c934c9938319f10a1114272b4 (diff)
downloadUXP-f2902217b38cf2e16e851ae84d61247f8e828180.tar
UXP-f2902217b38cf2e16e851ae84d61247f8e828180.tar.gz
UXP-f2902217b38cf2e16e851ae84d61247f8e828180.tar.lz
UXP-f2902217b38cf2e16e851ae84d61247f8e828180.tar.xz
UXP-f2902217b38cf2e16e851ae84d61247f8e828180.zip
Update the 7z installer stub source to 18.05.
Tag #1022
Diffstat (limited to 'other-licenses/7zstub/src/C/Lzma2Enc.h')
-rw-r--r--other-licenses/7zstub/src/C/Lzma2Enc.h55
1 files changed, 55 insertions, 0 deletions
diff --git a/other-licenses/7zstub/src/C/Lzma2Enc.h b/other-licenses/7zstub/src/C/Lzma2Enc.h
new file mode 100644
index 000000000..65f2dd145
--- /dev/null
+++ b/other-licenses/7zstub/src/C/Lzma2Enc.h
@@ -0,0 +1,55 @@
+/* Lzma2Enc.h -- LZMA2 Encoder
+2017-07-27 : Igor Pavlov : Public domain */
+
+#ifndef __LZMA2_ENC_H
+#define __LZMA2_ENC_H
+
+#include "LzmaEnc.h"
+
+EXTERN_C_BEGIN
+
+#define LZMA2_ENC_PROPS__BLOCK_SIZE__AUTO 0
+#define LZMA2_ENC_PROPS__BLOCK_SIZE__SOLID ((UInt64)(Int64)-1)
+
+typedef struct
+{
+ CLzmaEncProps lzmaProps;
+ UInt64 blockSize;
+ int numBlockThreads_Reduced;
+ int numBlockThreads_Max;
+ int numTotalThreads;
+} CLzma2EncProps;
+
+void Lzma2EncProps_Init(CLzma2EncProps *p);
+void Lzma2EncProps_Normalize(CLzma2EncProps *p);
+
+/* ---------- CLzmaEnc2Handle Interface ---------- */
+
+/* Lzma2Enc_* functions can return the following exit codes:
+SRes:
+ SZ_OK - OK
+ SZ_ERROR_MEM - Memory allocation error
+ SZ_ERROR_PARAM - Incorrect paramater in props
+ SZ_ERROR_WRITE - ISeqOutStream write callback error
+ SZ_ERROR_OUTPUT_EOF - output buffer overflow - version with (Byte *) output
+ SZ_ERROR_PROGRESS - some break from progress callback
+ SZ_ERROR_THREAD - error in multithreading functions (only for Mt version)
+*/
+
+typedef void * CLzma2EncHandle;
+
+CLzma2EncHandle Lzma2Enc_Create(ISzAllocPtr alloc, ISzAllocPtr allocBig);
+void Lzma2Enc_Destroy(CLzma2EncHandle p);
+SRes Lzma2Enc_SetProps(CLzma2EncHandle p, const CLzma2EncProps *props);
+void Lzma2Enc_SetDataSize(CLzma2EncHandle p, UInt64 expectedDataSiize);
+Byte Lzma2Enc_WriteProperties(CLzma2EncHandle p);
+SRes Lzma2Enc_Encode2(CLzma2EncHandle p,
+ ISeqOutStream *outStream,
+ Byte *outBuf, size_t *outBufSize,
+ ISeqInStream *inStream,
+ const Byte *inData, size_t inDataSize,
+ ICompressProgress *progress);
+
+EXTERN_C_END
+
+#endif