///** @file\r
-// \r
+//\r
// Front page formset.\r
-// \r
+//\r
// Copyright (c) 2007 - 2015, Intel Corporation. All rights reserved.<BR>\r
// SPDX-License-Identifier: BSD-2-Clause-Patent\r
-// \r
+//\r
//**/\r
\r
#define FORMSET_GUID { 0x9e0c30bc, 0x3f06, 0x4ba6, 0x82, 0x88, 0x9, 0x17, 0x9b, 0x85, 0x5d, 0xbe }\r
\r
label LABEL_FRANTPAGE_INFORMATION;\r
//\r
- // This is where we will dynamically add a Action type op-code to show \r
+ // This is where we will dynamically add a Action type op-code to show\r
// the platform information.\r
//\r
label LABEL_END;\r
//\r
// Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.<BR>\r
// SPDX-License-Identifier: BSD-2-Clause-Patent\r
-// \r
+//\r
//**/\r
\r
#define FORMSET_GUID { 0x3ebfa8e6, 0x511d, 0x4b5b, 0xa9, 0x5f, 0xfb, 0x38, 0x26, 0xf, 0x1c, 0x27 }\r
{\r
ILookInStream vt;\r
const ISeekInStream *realStream;\r
- \r
+\r
size_t pos;\r
size_t size; /* it's data size */\r
- \r
+\r
/* the following variables must be set outside */\r
Byte *buf;\r
size_t bufSize;\r
/*\r
These functions convert relative addresses to absolute addresses\r
in CALL instructions to increase the compression ratio.\r
- \r
+\r
In:\r
data - data buffer\r
size - size of data\r
ip - current virtual Instruction Pinter (IP) value\r
state - state variable for x86 converter\r
encoding - 0 (for decoding), 1 (for encoding)\r
- \r
+\r
Out:\r
state - state variable for x86 converter\r
\r
Returns:\r
The number of processed bytes. If you call these functions with multiple calls,\r
you must start next call with first byte after block of processed bytes.\r
- \r
+\r
Type Endian Alignment LookAhead\r
- \r
+\r
x86 little 1 4\r
ARMT little 2 2\r
ARM little 4 0\r
p->streamEndWasReached = 1;\r
return;\r
}\r
- \r
+\r
for (;;)\r
{\r
Byte *dest = p->buffer + (p->streamPos - p->pos);\r
ISzAllocPtr alloc)\r
{\r
UInt32 sizeReserv;\r
- \r
+\r
if (historySize > kMaxHistorySize)\r
{\r
MatchFinder_Free(p, alloc);\r
return 0;\r
}\r
- \r
+\r
sizeReserv = historySize >> 1;\r
if (historySize >= ((UInt32)3 << 30)) sizeReserv = historySize >> 3;\r
else if (historySize >= ((UInt32)2 << 30)) sizeReserv = historySize >> 2;\r
- \r
+\r
sizeReserv += (keepAddBufferBefore + matchMaxLen + keepAddBufferAfter) / 2 + (1 << 19);\r
\r
p->keepSizeBefore = historySize + keepAddBufferBefore + 1;\r
p->keepSizeAfter = matchMaxLen + keepAddBufferAfter;\r
- \r
+\r
/* we need one additional byte, since we use MoveBlock after pos++ and before dictionary using */\r
- \r
+\r
if (LzInWindow_Create(p, sizeReserv, alloc))\r
{\r
UInt32 newCyclicBufferSize = historySize + 1;\r
p->historySize = historySize;\r
p->hashSizeSum = hs;\r
p->cyclicBufferSize = newCyclicBufferSize;\r
- \r
+\r
numSons = newCyclicBufferSize;\r
if (p->btMode)\r
numSons <<= 1;\r
\r
if (p->hash && p->numRefs == newSize)\r
return 1;\r
- \r
+\r
MatchFinder_FreeThisClassMemory(p, alloc);\r
p->numRefs = newSize;\r
p->hash = AllocRefs(newSize, alloc);\r
- \r
+\r
if (p->hash)\r
{\r
p->son = p->hash + p->hashSizeSum;\r
{\r
UInt32 limit = kMaxValForNormalize - p->pos;\r
UInt32 limit2 = p->cyclicBufferSize - p->cyclicBufferPos;\r
- \r
+\r
if (limit2 < limit)\r
limit = limit2;\r
limit2 = p->streamPos - p->pos;\r
- \r
+\r
if (limit2 <= p->keepSizeAfter)\r
{\r
if (limit2 > 0)\r
}\r
else\r
limit2 -= p->keepSizeAfter;\r
- \r
+\r
if (limit2 < limit)\r
limit = limit2;\r
- \r
+\r
{\r
UInt32 lenLimit = p->streamPos - p->pos;\r
if (lenLimit > p->matchMaxLen)\r
p->streamPos = p->cyclicBufferSize;\r
p->result = SZ_OK;\r
p->streamEndWasReached = 0;\r
- \r
+\r
if (readData)\r
MatchFinder_ReadBlock(p);\r
- \r
+\r
MatchFinder_SetLimits(p);\r
}\r
\r
MatchFinder_Init_3(p, True);\r
}\r
\r
- \r
+\r
static UInt32 MatchFinder_GetSubValue(CMatchFinder *p)\r
{\r
return (p->pos - p->historySize - 1) & kNormalizeMask;\r
d2 = pos - hash[h2];\r
\r
curMatch = (hash + kFix3HashSize)[hv];\r
- \r
+\r
hash[h2] = pos;\r
(hash + kFix3HashSize)[hv] = pos;\r
\r
MOVE_POS_RET;\r
}\r
}\r
- \r
+\r
GET_MATCHES_FOOTER(offset, maxLen)\r
}\r
\r
\r
maxLen = 0;\r
offset = 0;\r
- \r
+\r
if (d2 < p->cyclicBufferSize && *(cur - d2) == *cur)\r
{\r
distances[0] = maxLen = 2;\r
distances[1] = d2 - 1;\r
offset = 2;\r
}\r
- \r
+\r
if (d2 != d3 && d3 < p->cyclicBufferSize && *(cur - d3) == *cur)\r
{\r
maxLen = 3;\r
offset += 2;\r
d2 = d3;\r
}\r
- \r
+\r
if (offset != 0)\r
{\r
UPDATE_maxLen\r
MOVE_POS_RET;\r
}\r
}\r
- \r
+\r
if (maxLen < 3)\r
maxLen = 3;\r
- \r
+\r
GET_MATCHES_FOOTER(offset, maxLen)\r
}\r
\r
offset = 2;\r
d2 = d3;\r
}\r
- \r
+\r
if (d2 != d4 && d4 < p->cyclicBufferSize\r
&& *(cur - d4) == *cur\r
&& *(cur - d4 + 3) == *(cur + 3))\r
offset += 2;\r
d2 = d4;\r
}\r
- \r
+\r
if (offset != 0)\r
{\r
UPDATE_maxLen\r
\r
if (maxLen < 4)\r
maxLen = 4;\r
- \r
+\r
GET_MATCHES_FOOTER(offset, maxLen)\r
}\r
*/\r
\r
hash = p->hash;\r
pos = p->pos;\r
- \r
+\r
d2 = pos - hash[ h2];\r
d3 = pos - (hash + kFix3HashSize)[h3];\r
- \r
+\r
curMatch = (hash + kFix4HashSize)[hv];\r
\r
hash[ h2] = pos;\r
distances[1] = d2 - 1;\r
offset = 2;\r
}\r
- \r
+\r
if (d2 != d3 && d3 < p->cyclicBufferSize && *(cur - d3) == *cur)\r
{\r
maxLen = 3;\r
offset += 2;\r
d2 = d3;\r
}\r
- \r
+\r
if (offset != 0)\r
{\r
UPDATE_maxLen\r
MOVE_POS_RET;\r
}\r
}\r
- \r
+\r
if (maxLen < 3)\r
maxLen = 3;\r
\r
\r
hash = p->hash;\r
pos = p->pos;\r
- \r
+\r
d2 = pos - hash[ h2];\r
d3 = pos - (hash + kFix3HashSize)[h3];\r
d4 = pos - (hash + kFix4HashSize)[h4];\r
offset = 2;\r
d2 = d3;\r
}\r
- \r
+\r
if (d2 != d4 && d4 < p->cyclicBufferSize\r
&& *(cur - d4) == *cur\r
&& *(cur - d4 + 3) == *(cur + 3))\r
offset += 2;\r
d2 = d4;\r
}\r
- \r
+\r
if (offset != 0)\r
{\r
UPDATE_maxLen\r
MOVE_POS_RET;\r
}\r
}\r
- \r
+\r
if (maxLen < 4)\r
maxLen = 4;\r
\r
\r
Byte *bufferBase;\r
ISeqInStream *stream;\r
- \r
+\r
UInt32 blockSize;\r
UInt32 keepSizeBefore;\r
UInt32 keepSizeAfter;\r
((p)->streamEndWasReached \\r
&& (p)->streamPos == (p)->pos \\r
&& (!(p)->directInput || (p)->directInputRem == 0))\r
- \r
+\r
int MatchFinder_NeedMove(CMatchFinder *p);\r
Byte *MatchFinder_GetPointerToCurrentPos(CMatchFinder *p);\r
void MatchFinder_MoveBlock(CMatchFinder *p);\r
Byte *dic = p->dic;\r
SizeT dicBufSize = p->dicBufSize;\r
SizeT dicPos = p->dicPos;\r
- \r
+\r
UInt32 processedPos = p->processedPos;\r
UInt32 checkDicSize = p->checkDicSize;\r
unsigned len = 0;\r
dic[dicPos++] = (Byte)symbol;\r
continue;\r
}\r
- \r
+\r
{\r
UPDATE_1(prob);\r
prob = probs + IsRep + state;\r
state = state < kNumLitStates ? 8 : 11;\r
prob = probs + RepLenCoder;\r
}\r
- \r
+\r
#ifdef _LZMA_SIZE_OPT\r
{\r
unsigned lim, offset;\r
{\r
NORMALIZE\r
range >>= 1;\r
- \r
+\r
{\r
UInt32 t;\r
code -= range;\r
}\r
}\r
}\r
- \r
+\r
rep3 = rep2;\r
rep2 = rep1;\r
rep1 = rep0;\r
SizeT rem;\r
unsigned curLen;\r
SizeT pos;\r
- \r
+\r
if ((rem = limit - dicPos) == 0)\r
{\r
p->dicPos = dicPos;\r
return SZ_ERROR_DATA;\r
}\r
- \r
+\r
curLen = ((rem < len) ? (unsigned)rem : len);\r
pos = dicPos - rep0 + (dicPos < rep0 ? dicBufSize : 0);\r
\r
while (dicPos < limit && buf < bufLimit);\r
\r
NORMALIZE;\r
- \r
+\r
p->buf = buf;\r
p->range = range;\r
p->code = code;\r
}\r
\r
RINOK(LZMA_DECODE_REAL(p, limit2, bufLimit));\r
- \r
+\r
if (p->checkDicSize == 0 && p->processedPos >= p->prop.dicSize)\r
p->checkDicSize = p->prop.dicSize;\r
- \r
+\r
LzmaDec_WriteRem(p, limit);\r
}\r
while (p->dicPos < limit && p->buf < bufLimit && p->remainLen < kMatchSpecLenStart);\r
{\r
SizeT inSize = *srcLen;\r
(*srcLen) = 0;\r
- \r
+\r
*status = LZMA_STATUS_NOT_SPECIFIED;\r
\r
if (p->remainLen > kMatchSpecLenStart)\r
p->buf = p->tempBuf;\r
if (LzmaDec_DecodeReal2(p, dicLimit, p->buf) != 0)\r
return SZ_ERROR_DATA;\r
- \r
+\r
{\r
unsigned kkk = (unsigned)(p->buf - p->tempBuf);\r
if (rem < kkk)\r
p->tempBufSize = 0;\r
}\r
}\r
- \r
+\r
if (p->code != 0)\r
return SZ_ERROR_DATA;\r
*status = LZMA_STATUS_FINISHED_WITH_MARK;\r
{\r
UInt32 dicSize;\r
Byte d;\r
- \r
+\r
if (size < LZMA_PROPS_SIZE)\r
return SZ_ERROR_UNSUPPORTED;\r
else\r
dicSize = data[1] | ((UInt32)data[2] << 8) | ((UInt32)data[3] << 16) | ((UInt32)data[4] << 24);\r
- \r
+\r
if (dicSize < LZMA_DIC_MIN)\r
dicSize = LZMA_DIC_MIN;\r
p->dicSize = dicSize;\r
SZ_ERROR_MEM - Memory allocation error\r
SZ_ERROR_UNSUPPORTED - Unsupported properties\r
*/\r
- \r
+\r
SRes LzmaDec_AllocateProbs(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAllocPtr alloc);\r
void LzmaDec_FreeProbs(CLzmaDec *p, ISzAllocPtr alloc);\r
\r
*/\r
\r
/* LzmaDec_DecodeToDic\r
- \r
+\r
The decoding to internal dictionary buffer (CLzmaDec::dic).\r
You must manually update CLzmaDec::dicPos, if it reaches CLzmaDec::dicBufSize !!!\r
\r
\r
18.05 2018-04-30\r
-------------------------\r
-- The speed for LZMA/LZMA2 compressing was increased \r
- by 8% for fastest/fast compression levels and \r
+- The speed for LZMA/LZMA2 compressing was increased\r
+ by 8% for fastest/fast compression levels and\r
by 3% for normal/maximum compression levels.\r
- Previous versions of 7-Zip could work incorrectly in "Large memory pages" mode in\r
- Windows 10 because of some BUG with "Large Pages" in Windows 10. \r
+ Windows 10 because of some BUG with "Large Pages" in Windows 10.\r
Now 7-Zip doesn't use "Large Pages" on Windows 10 up to revision 1709 (16299).\r
- The BUG was fixed in Lzma2Enc.c\r
Lzma2Enc_Encode2() function worked incorretly,\r
\r
18.03 beta 2018-03-04\r
-------------------------\r
-- Asm\x86\LzmaDecOpt.asm: new optimized LZMA decoder written in asm \r
+- Asm\x86\LzmaDecOpt.asm: new optimized LZMA decoder written in asm\r
for x64 with about 30% higher speed than main version of LZMA decoder written in C.\r
- The speed for single-thread LZMA/LZMA2 decoder written in C was increased by 3%.\r
- 7-Zip now can use multi-threading for 7z/LZMA2 decoding,\r
18.00 beta 2019-01-10\r
-------------------------\r
- The BUG in xz encoder was fixed:\r
- There was memory leak of 16 KB for each file compressed with \r
+ There was memory leak of 16 KB for each file compressed with\r
xz compression method, if additional filter was used.\r
\r
\r
- Minor speed optimization for LZMA2 (xz and 7z) multi-threading compression.\r
7-Zip now uses additional memory buffers for multi-block LZMA2 compression.\r
CPU utilization was slightly improved.\r
-- 7-zip now creates multi-block xz archives by default. Block size can be \r
+- 7-zip now creates multi-block xz archives by default. Block size can be\r
specified with -ms[Size]{m|g} switch.\r
- xz decoder now can unpack random block from multi-block xz archives.\r
- 7-Zip command line: @listfile now doesn't work after -- switch.\r
\r
17.00 beta 2017-04-29\r
-------------------------\r
-- NewHandler.h / NewHandler.cpp: \r
+- NewHandler.h / NewHandler.cpp:\r
now it redefines operator new() only for old MSVC compilers (_MSC_VER < 1900).\r
- C/7zTypes.h : the names of variables in interface structures were changed (vt).\r
- Some bugs were fixed. 7-Zip could crash in some cases.\r
16.02 2016-05-21\r
-------------------------\r
- The BUG in 16.00 - 16.01 was fixed:\r
- Split Handler (SplitHandler.cpp) returned incorrect \r
+ Split Handler (SplitHandler.cpp) returned incorrect\r
total size value (kpidSize) for split archives.\r
\r
\r
16.01 2016-05-19\r
-------------------------- \r
+-------------------------\r
- Some internal changes to reduce the number of compiler warnings.\r
\r
\r
16.00 2016-05-10\r
-------------------------- \r
+-------------------------\r
- Some bugs were fixed.\r
\r
\r
15.12 2015-11-19\r
-------------------------- \r
+-------------------------\r
- The BUG in C version of 7z decoder was fixed:\r
7zDec.c : SzDecodeLzma2()\r
7z decoder could mistakenly report about decoding error for some 7z archives\r
that use LZMA2 compression method.\r
- The probability to get that mistaken decoding error report was about \r
- one error per 16384 solid blocks for solid blocks larger than 16 KB (compressed size). \r
+ The probability to get that mistaken decoding error report was about\r
+ one error per 16384 solid blocks for solid blocks larger than 16 KB (compressed size).\r
- The BUG (in 9.26-15.11) in C version of 7z decoder was fixed:\r
7zArcIn.c : SzReadHeader2()\r
- 7z decoder worked incorrectly for 7z archives that contain \r
- empty solid blocks, that can be placed to 7z archive, if some file is \r
+ 7z decoder worked incorrectly for 7z archives that contain\r
+ empty solid blocks, that can be placed to 7z archive, if some file is\r
unavailable for reading during archive creation.\r
\r
\r
15.09 beta 2015-10-16\r
-------------------------- \r
+-------------------------\r
- The BUG in LZMA / LZMA2 encoding code was fixed.\r
The BUG in LzFind.c::MatchFinder_ReadBlock() function.\r
If input data size is larger than (4 GiB - dictionary_size),\r
the following code worked incorrectly:\r
- - LZMA : LzmaEnc_MemEncode(), LzmaEncode() : LZMA encoding functions \r
- for compressing from memory to memory. \r
+ - LZMA : LzmaEnc_MemEncode(), LzmaEncode() : LZMA encoding functions\r
+ for compressing from memory to memory.\r
That BUG is not related to LZMA encoder version that works via streams.\r
- - LZMA2 : multi-threaded version of LZMA2 encoder worked incorrectly, if \r
- default value of chunk size (CLzma2EncProps::blockSize) is changed \r
+ - LZMA2 : multi-threaded version of LZMA2 encoder worked incorrectly, if\r
+ default value of chunk size (CLzma2EncProps::blockSize) is changed\r
to value larger than (4 GiB - dictionary_size).\r
\r
\r
9.38 beta 2015-01-03\r
-------------------------- \r
+-------------------------\r
- The BUG in 9.31-9.37 was fixed:\r
IArchiveGetRawProps interface was disabled for 7z archives.\r
- The BUG in 9.26-9.36 was fixed:\r
\r
\r
9.36 beta 2014-12-26\r
-------------------------- \r
+-------------------------\r
- The BUG in command line version was fixed:\r
7-Zip created temporary archive in current folder during update archive\r
- operation, if -w{Path} switch was not specified. \r
+ operation, if -w{Path} switch was not specified.\r
The fixed 7-Zip creates temporary archive in folder that contains updated archive.\r
- The BUG in 9.33-9.35 was fixed:\r
7-Zip silently ignored file reading errors during 7z or gz archive creation,\r
\r
\r
9.35 beta 2014-12-07\r
-------------------------- \r
+-------------------------\r
- 7zr.exe now support AES encryption.\r
- SFX mudules were added to LZMA SDK\r
- Some bugs were fixed.\r
\r
\r
9.21 beta 2011-04-11\r
-------------------------- \r
+-------------------------\r
- New class FString for file names at file systems.\r
- Speed optimization in CRC code for big-endian CPUs.\r
- The BUG in Lzma2Dec.c was fixed:\r
\r
\r
9.18 beta 2010-11-02\r
-------------------------- \r
+-------------------------\r
- New small SFX module for installers (SfxSetup).\r
\r
\r
9.11 beta 2010-03-15\r
-------------------------\r
- PPMd compression method support\r
- \r
+\r
\r
9.09 2009-12-12\r
-------------------------\r
4.61 beta 2008-11-23\r
-------------------------\r
- The bug in ANSI-C LZMA Decoder was fixed:\r
- If encoded stream was corrupted, decoder could access memory \r
+ If encoded stream was corrupted, decoder could access memory\r
outside of allocated range.\r
- Some changes in ANSI-C 7z Decoder interfaces.\r
- LZMA SDK is placed in the public domain.\r
4.59 beta 2008-08-13\r
-------------------------\r
- The bug was fixed:\r
- LZMA Encoder in fast compression mode could access memory outside of \r
+ LZMA Encoder in fast compression mode could access memory outside of\r
allocated range in some rare cases.\r
\r
\r
\r
4.57 2007-12-12\r
-------------------------\r
-- Speed optimizations in ?++ LZMA Decoder. \r
+- Speed optimizations in ?++ LZMA Decoder.\r
- Small changes for more compatibility with some C/C++ compilers.\r
\r
\r
- now it supports BCJ and BCJ2 filters\r
- now it supports files larger than 4 GB.\r
- now it supports "Last Write Time" field for files.\r
-- C++ code for .7z archives compressing/decompressing from 7-zip \r
+- C++ code for .7z archives compressing/decompressing from 7-zip\r
was included to LZMA SDK.\r
- \r
+\r
\r
4.43 2006-06-04\r
-------------------------\r
- Small changes for more compatibility with some C/C++ compilers.\r
- \r
+\r
\r
4.42 2006-05-15\r
-------------------------\r
- Small changes in .h files in ANSI-C version.\r
- \r
+\r
\r
4.39 beta 2006-04-14\r
-------------------------\r
- The bug in versions 4.33b:4.38b was fixed:\r
- C++ version of LZMA encoder could not correctly compress \r
+ C++ version of LZMA encoder could not correctly compress\r
files larger than 2 GB with HC4 match finder (-mfhc4).\r
- \r
+\r
\r
4.37 beta 2005-04-06\r
-------------------------\r
-- Fixes in C++ code: code could no be compiled if _NO_EXCEPTIONS was defined. \r
+- Fixes in C++ code: code could no be compiled if _NO_EXCEPTIONS was defined.\r
\r
\r
4.35 beta 2005-03-02\r
-------------------------\r
- The bug was fixed in C++ version of LZMA Decoder:\r
- If encoded stream was corrupted, decoder could access memory \r
+ If encoded stream was corrupted, decoder could access memory\r
outside of allocated range.\r
\r
\r
\r
4.17 2005-04-18\r
-------------------------\r
-- New example for RAM->RAM compressing/decompressing: \r
+- New example for RAM->RAM compressing/decompressing:\r
LZMA + BCJ (filter for x86 code):\r
- LzmaRam.h\r
- LzmaRam.cpp\r
\r
4.16 2005-03-29\r
-------------------------\r
-- The bug was fixed in LzmaDecode.c (ANSI-C LZMA Decoder): \r
+- The bug was fixed in LzmaDecode.c (ANSI-C LZMA Decoder):\r
If _LZMA_OUT_READ was defined, and if encoded stream was corrupted,\r
decoder could access memory outside of allocated range.\r
- Speed optimization of ANSI-C LZMA Decoder (now it's about 20% faster).\r
- Old version of LZMA Decoder now is in file LzmaDecodeSize.c. \r
+ Old version of LZMA Decoder now is in file LzmaDecodeSize.c.\r
LzmaDecodeSize.c can provide slightly smaller code than LzmaDecode.c\r
- Small speed optimization in LZMA C++ code\r
- filter for SPARC's code was added\r
\r
4.05 2004-08-25\r
-------------------------\r
-- Source code of filters for x86, IA-64, ARM, ARM-Thumb \r
+- Source code of filters for x86, IA-64, ARM, ARM-Thumb\r
and PowerPC code was included to SDK\r
- Some internal minor changes\r
\r
\r
4.03 2004-06-18\r
-------------------------\r
-- "Benchmark" command was added. It measures compressing \r
- and decompressing speed and shows rating values. \r
+- "Benchmark" command was added. It measures compressing\r
+ and decompressing speed and shows rating values.\r
Also it checks hardware errors.\r
\r
\r
\r
HISTORY of the LZMA\r
-------------------\r
- 2001-2008: Improvements to LZMA compressing/decompressing code, \r
+ 2001-2008: Improvements to LZMA compressing/decompressing code,\r
keeping compatibility with original LZMA format\r
1996-2001: Development of LZMA compression format\r
\r
\r
2001-08-30: LZMA compression was added to 7-Zip\r
1999-01-02: First version of 7-Zip was released\r
- \r
+\r
\r
End of document\r
--------------\r
\r
LZMA SDK provides the documentation, samples, header files,\r
-libraries, and tools you need to develop applications that \r
+libraries, and tools you need to develop applications that\r
use 7z / LZMA / LZMA2 / XZ compression.\r
\r
-LZMA is an improved version of famous LZ77 compression algorithm. \r
+LZMA is an improved version of famous LZ77 compression algorithm.\r
It was improved in way of maximum increasing of compression ratio,\r
-keeping high decompression speed and low memory requirements for \r
+keeping high decompression speed and low memory requirements for\r
decompressing.\r
\r
-LZMA2 is a LZMA based compression method. LZMA2 provides better \r
+LZMA2 is a LZMA based compression method. LZMA2 provides better\r
multithreading support for compression than LZMA and some other improvements.\r
\r
7z is a file format for data compression and file archiving.\r
7z also supports AES-256 based encryption.\r
\r
XZ is a file format for data compression that uses LZMA2 compression.\r
-XZ format provides additional features: SHA/CRC check, filters for \r
+XZ format provides additional features: SHA/CRC check, filters for\r
improved compression ratio, splitting to blocks and streams,\r
\r
\r
1) PPMd var.H (2001): Dmitry Shkarin\r
2) SHA-256: Wei Dai (Crypto++ library)\r
\r
-Anyone is free to copy, modify, publish, use, compile, sell, or distribute the \r
-original LZMA SDK code, either in source code form or as a compiled binary, for \r
+Anyone is free to copy, modify, publish, use, compile, sell, or distribute the\r
+original LZMA SDK code, either in source code form or as a compiled binary, for\r
any purpose, commercial or non-commercial, and by any means.\r
\r
-LZMA SDK code is compatible with open source licenses, for example, you can \r
+LZMA SDK code is compatible with open source licenses, for example, you can\r
include it to GNU GPL or GNU LGPL code.\r
\r
\r
- SFX modules for installers.\r
\r
\r
-UNIX/Linux version \r
+UNIX/Linux version\r
------------------\r
To compile C++ version of file->file LZMA encoding, go to directory\r
CPP/7zip/Bundles/LzmaCon\r
make -f makefile.gcc clean all\r
\r
In some UNIX/Linux versions you must compile LZMA with static libraries.\r
-To compile with static libraries, you can use \r
+To compile with static libraries, you can use\r
LIB = -lm -static\r
\r
Also you can use p7zip (port of 7-Zip for POSIX systems like Unix or Linux):\r
- \r
+\r
http://p7zip.sourceforge.net/\r
\r
\r
7z - 7z decoder program (decoding 7z files)\r
Lzma - LZMA program (file->file LZMA encoder/decoder).\r
LzmaLib - LZMA library (.DLL for Windows)\r
- SfxSetup - small SFX module for installers \r
+ SfxSetup - small SFX module for installers\r
\r
CPP/ -- CPP files\r
\r
7z - 7z C++ Encoder/Decoder\r
\r
Bundles - Modules that are bundles of other modules (files)\r
- \r
+\r
Alone7z - 7zr.exe: Standalone 7-Zip console program (reduced version)\r
Format7zExtractR - 7zxr.dll: Reduced version of 7z DLL: extracting from 7z/LZMA/BCJ/BCJ2.\r
Format7zR - 7zr.dll: Reduced version of 7z DLL: extracting/compressing to 7z/LZMA/BCJ/BCJ2\r
Crypto - files for encryption / decompression\r
\r
UI - User Interface files\r
- \r
+\r
Client7z - Test application for 7za.dll, 7zr.dll, 7zxr.dll\r
Common - Common UI files\r
Console - Code for console program (7z.exe)\r
RangeCoder - Range Coder (special code of compression/decompression)\r
\r
\r
-Note: \r
+Note:\r
Asm / C / C++ source code of LZMA SDK is part of 7-Zip's source code.\r
7-Zip's source code can be downloaded from 7-Zip's SourceForge page:\r
\r
-------------\r
- Variable dictionary size (up to 1 GB)\r
- Estimated compressing speed: about 2 MB/s on 2 GHz CPU\r
- - Estimated decompressing speed: \r
+ - Estimated decompressing speed:\r
- 20-30 MB/s on modern 2 GHz cpu\r
- 1-2 MB/s on 200 MHz simple RISC cpu: (ARM, MIPS, PowerPC)\r
- Small memory requirements for decompressing (16 KB + DictionarySize)\r
- Small code size for decompressing: 5-8 KB\r
\r
-LZMA decoder uses only integer operations and can be \r
+LZMA decoder uses only integer operations and can be\r
implemented in any modern 32-bit CPU (or on 16-bit CPU with some conditions).\r
\r
Some critical operations that affect the speed of LZMA decompression:\r
3) 32-bit shift and arithmetic operations\r
\r
The speed of LZMA decompressing mostly depends from CPU speed.\r
-Memory speed has no big meaning. But if your CPU has small data cache, \r
+Memory speed has no big meaning. But if your CPU has small data cache,\r
overall weight of memory speed will slightly increase.\r
\r
\r
\r
d: decode file\r
\r
- b: Benchmark. There are two tests: compressing and decompressing \r
- with LZMA method. Benchmark shows rating in MIPS (million \r
- instructions per second). Rating value is calculated from \r
+ b: Benchmark. There are two tests: compressing and decompressing\r
+ with LZMA method. Benchmark shows rating in MIPS (million\r
+ instructions per second). Rating value is calculated from\r
measured speed and it is normalized with Intel's Core 2 results.\r
- Also Benchmark checks possible hardware errors (RAM \r
+ Also Benchmark checks possible hardware errors (RAM\r
errors in most cases). Benchmark uses these settings:\r
- (-a1, -d21, -fb32, -mfbt4). You can change only -d parameter. \r
+ (-a1, -d21, -fb32, -mfbt4). You can change only -d parameter.\r
Also you can change the number of iterations. Example for 30 iterations:\r
LZMA b 30\r
Default number of iterations is 10.\r
\r
<Switches>\r
- \r
+\r
\r
-a{N}: set compression mode 0 = fast, 1 = normal\r
default: 1 (normal)\r
\r
d{N}: Sets Dictionary size - [0, 30], default: 23 (8MB)\r
The maximum value for dictionary size is 1 GB = 2^30 bytes.\r
- Dictionary size is calculated as DictionarySize = 2^N bytes. \r
- For decompressing file compressed by LZMA method with dictionary \r
+ Dictionary size is calculated as DictionarySize = 2^N bytes.\r
+ For decompressing file compressed by LZMA method with dictionary\r
size D = 2^N you need about D bytes of memory (RAM).\r
\r
-fb{N}: set number of fast bytes - [5, 273], default: 128\r
- Usually big number gives a little bit better compression ratio \r
+ Usually big number gives a little bit better compression ratio\r
and slower compression process.\r
\r
-lc{N}: set number of literal context bits - [0, 8], default: 3\r
Sometimes lc=4 gives gain for big files.\r
\r
-lp{N}: set number of literal pos bits - [0, 4], default: 0\r
- lp switch is intended for periodical data when period is \r
- equal 2^N. For example, for 32-bit (4 bytes) \r
- periodical data you can use lp=2. Often it's better to set lc0, \r
+ lp switch is intended for periodical data when period is\r
+ equal 2^N. For example, for 32-bit (4 bytes)\r
+ periodical data you can use lp=2. Often it's better to set lc0,\r
if you change lp switch.\r
\r
-pb{N}: set number of pos bits - [0, 4], default: 2\r
- pb switch is intended for periodical data \r
+ pb switch is intended for periodical data\r
when period is equal 2^N.\r
\r
- -mf{MF_ID}: set Match Finder. Default: bt4. \r
- Algorithms from hc* group doesn't provide good compression \r
- ratio, but they often works pretty fast in combination with \r
+ -mf{MF_ID}: set Match Finder. Default: bt4.\r
+ Algorithms from hc* group doesn't provide good compression\r
+ ratio, but they often works pretty fast in combination with\r
fast mode (-a0).\r
\r
- Memory requirements depend from dictionary size \r
- (parameter "d" in table below). \r
+ Memory requirements depend from dictionary size\r
+ (parameter "d" in table below).\r
\r
MF_ID Memory Description\r
\r
bt4 d * 11.5 + 4MB Binary Tree with 4 bytes hashing.\r
hc4 d * 7.5 + 4MB Hash Chain with 4 bytes hashing.\r
\r
- -eos: write End Of Stream marker. By default LZMA doesn't write \r
- eos marker, since LZMA decoder knows uncompressed size \r
+ -eos: write End Of Stream marker. By default LZMA doesn't write\r
+ eos marker, since LZMA decoder knows uncompressed size\r
stored in .lzma file header.\r
\r
-si: Read data from stdin (it will write End Of Stream marker).\r
\r
Examples:\r
\r
-1) LZMA e file.bin file.lzma -d16 -lc0 \r
+1) LZMA e file.bin file.lzma -d16 -lc0\r
\r
-compresses file.bin to file.lzma with 64 KB dictionary (2^16=64K) \r
-and 0 literal context bits. -lc0 allows to reduce memory requirements \r
+compresses file.bin to file.lzma with 64 KB dictionary (2^16=64K)\r
+and 0 literal context bits. -lc0 allows to reduce memory requirements\r
for decompression.\r
\r
\r
2) LZMA e file.bin file.lzma -lc0 -lp2\r
\r
-compresses file.bin to file.lzma with settings suitable \r
+compresses file.bin to file.lzma with settings suitable\r
for 32-bit periodical data (for example, ARM or MIPS code).\r
\r
3) LZMA d file.lzma file.bin\r
Recommendations\r
---------------\r
\r
-To increase the compression ratio for LZMA compressing it's desirable \r
+To increase the compression ratio for LZMA compressing it's desirable\r
to have aligned data (if it's possible) and also it's desirable to locate\r
-data in such order, where code is grouped in one place and data is \r
+data in such order, where code is grouped in one place and data is\r
grouped in other place (it's better than such mixing: code, data, code,\r
data, ...).\r
\r
Filters\r
-------\r
You can increase the compression ratio for some data types, using\r
-special filters before compressing. For example, it's possible to \r
-increase the compression ratio on 5-10% for code for those CPU ISAs: \r
+special filters before compressing. For example, it's possible to\r
+increase the compression ratio on 5-10% for code for those CPU ISAs:\r
x86, IA-64, ARM, ARM-Thumb, PowerPC, SPARC.\r
\r
You can find C source code of such filters in C/Bra*.* files\r
\r
-You can check the compression ratio gain of these filters with such \r
+You can check the compression ratio gain of these filters with such\r
7-Zip commands (example for ARM code):\r
No filter:\r
7z a a1.7z a.bin -m0=lzma\r
\r
With filter for little-endian ARM code:\r
- 7z a a2.7z a.bin -m0=arm -m1=lzma \r
+ 7z a a2.7z a.bin -m0=arm -m1=lzma\r
\r
It works in such manner:\r
Compressing = Filter_encoding + LZMA_encoding\r
\r
Compressing and decompressing speed of such filters is very high,\r
so it will not increase decompressing time too much.\r
-Moreover, it reduces decompression time for LZMA_decoding, \r
+Moreover, it reduces decompression time for LZMA_decoding,\r
since compression ratio with filtering is higher.\r
\r
-These filters convert CALL (calling procedure) instructions \r
-from relative offsets to absolute addresses, so such data becomes more \r
+These filters convert CALL (calling procedure) instructions\r
+from relative offsets to absolute addresses, so such data becomes more\r
compressible.\r
\r
For some ISAs (for example, for MIPS) it's impossible to get gain from such filter.\r
///** @file\r
-// \r
+//\r
// VFR to produce the formset used by BDS. This form only lists\r
// the Configure Required driver health instances.\r
-// \r
+//\r
// Copyright (c) 2013 - 2015, Intel Corporation. All rights reserved.<BR>\r
// SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
\r
label LABEL_BEGIN;\r
label LABEL_END;\r
- \r
+\r
suppressif TRUE;\r
text\r
help = STRING_TOKEN(STR_NULL),\r
///** @file\r
-// \r
+//\r
// VFR to produce the formset used by UI.\r
-// \r
+//\r
// Copyright (c) 2013 - 2015, Intel Corporation. All rights reserved.<BR>\r
// SPDX-License-Identifier: BSD-2-Clause-Patent\r
//**/\r
/** @file\r
- \r
+\r
Module to rewrite stdlib references within Oniguruma\r
\r
(C) Copyright 2014-2015 Hewlett Packard Enterprise Development LP<BR>\r
/** @file\r
- \r
+\r
Module to rewrite stdlib references within Oniguruma\r
\r
(C) Copyright 2014-2015 Hewlett Packard Enterprise Development LP<BR>\r
case OP_CCLASS_MB_NOT:\r
{\r
OnigCodePoint ncode;\r
- OnigCodePoint* codes; \r
+ OnigCodePoint* codes;\r
\r
codes = (OnigCodePoint* )p->cclass_mb.mb;\r
GET_CODE_POINT(ncode, codes);\r