mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-06 03:14:59 -06:00
- Minor speed optimization for LZMA2 (xz and 7z) multi-threading compression.
7-Zip now uses additional memory buffers for multi-block LZMA2 compression.
CPU utilization was slightly improved.
- 7-zip now creates multi-block xz archives by default. Block size can be
specified with -ms[Size]{m|g} switch.
- xz decoder now can unpack random block from multi-block xz archives. 7-Zip
File Manager now can open nested multi-block xz archives (for example,
image.iso.xz) without full unpacking of xz archive.
- 7-Zip now can create zip archives from stdin to stdout.
- 7-Zip command line: @listfile now doesn't work after -- switch. Use
-i@listfile before -- switch instead.
fixed bugs:
- 7-Zip could add unrequired alternate file streams to WIM archives, for
commands that contain filename wildcards and -sns switch.
- 7-Zip 17.00 beta crashed for commands that write anti-item to 7z archive.
- 7-Zip 17.00 beta ignored "Use large memory pages" option.
56 lines
1.6 KiB
C
56 lines
1.6 KiB
C
/* 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
|