]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Library/LzmaCustomDecompressLib/Sdk/DOC/lzma-sdk.txt
MdeModulePkg: strip trailing whitespace
[mirror_edk2.git] / MdeModulePkg / Library / LzmaCustomDecompressLib / Sdk / DOC / lzma-sdk.txt
index 01521e9398875247b286b6f9a7a033983bd9c7b7..bf0b3a5ee62d2ab89bc65ccde17bc6b5019de1f1 100644 (file)
@@ -2,15 +2,15 @@ LZMA SDK 18.05
 --------------\r
 \r
 LZMA SDK provides the documentation, samples, header files,\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
 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
 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
 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
 multithreading support for compression than LZMA and some other improvements.\r
 \r
 7z is a file format for data compression and file archiving.\r
@@ -19,7 +19,7 @@ multithreading support for compression than LZMA and some other improvements.
 7z also supports AES-256 based encryption.\r
 \r
 XZ is a file format for data compression that uses LZMA2 compression.\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
 improved compression ratio, splitting to blocks and streams,\r
 \r
 \r
@@ -33,11 +33,11 @@ Some code in LZMA SDK is based on public domain code from another developers:
   1) PPMd var.H (2001): Dmitry Shkarin\r
   2) SHA-256: Wei Dai (Crypto++ library)\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
 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
 include it to GNU GPL or GNU LGPL code.\r
 \r
 \r
@@ -60,7 +60,7 @@ LZMA SDK Contents
     - SFX modules for installers.\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
 ------------------\r
 To compile C++ version of file->file LZMA encoding, go to directory\r
 CPP/7zip/Bundles/LzmaCon\r
@@ -68,11 +68,11 @@ and call make to recompile it:
   make -f makefile.gcc clean all\r
 \r
 In some UNIX/Linux versions you must compile LZMA with static libraries.\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
 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
   http://p7zip.sourceforge.net/\r
 \r
 \r
@@ -120,7 +120,7 @@ C/  - C files (compression / decompression and other)
     7z       - 7z decoder program (decoding 7z files)\r
     Lzma     - LZMA program (file->file LZMA encoder/decoder).\r
     LzmaLib  - LZMA library (.DLL for Windows)\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
 \r
 CPP/ -- CPP files\r
 \r
@@ -135,7 +135,7 @@ CPP/ -- CPP files
       7z       - 7z C++ Encoder/Decoder\r
 \r
     Bundles  - Modules that are bundles of other modules (files)\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
       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
@@ -152,7 +152,7 @@ CPP/ -- CPP files
     Crypto   - files for encryption / decompression\r
 \r
     UI       - User Interface files\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
       Client7z - Test application for 7za.dll, 7zr.dll, 7zxr.dll\r
       Common   - Common UI files\r
       Console  - Code for console program (7z.exe)\r
@@ -178,7 +178,7 @@ Java/  - Java files
       RangeCoder   - Range Coder (special code of compression/decompression)\r
 \r
 \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
   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
@@ -190,13 +190,13 @@ LZMA features
 -------------\r
   - Variable dictionary size (up to 1 GB)\r
   - Estimated compressing speed: about 2 MB/s on 2 GHz CPU\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
       - 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
 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
@@ -205,7 +205,7 @@ Some critical operations that affect the speed of LZMA decompression:
   3) 32-bit shift and arithmetic operations\r
 \r
 The speed of LZMA decompressing mostly depends from CPU speed.\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
 overall weight of memory speed will slightly increase.\r
 \r
 \r
@@ -221,53 +221,53 @@ Usage:  LZMA <e|d> inputFile outputFile [<switches>...]
 \r
   d: decode file\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
      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
      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
      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
 \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
           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
           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
           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
           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
               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
 \r
                MF_ID     Memory                   Description\r
 \r
@@ -276,8 +276,8 @@ Usage:  LZMA <e|d> inputFile outputFile [<switches>...]
                 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
                 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
           stored in .lzma file header.\r
 \r
   -si:    Read data from stdin (it will write End Of Stream marker).\r
@@ -286,16 +286,16 @@ Usage:  LZMA <e|d> inputFile outputFile [<switches>...]
 \r
 Examples:\r
 \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
 \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
 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
 for 32-bit periodical data (for example, ARM or MIPS code).\r
 \r
 3) LZMA d file.lzma file.bin\r
@@ -309,9 +309,9 @@ Compression ratio hints
 Recommendations\r
 ---------------\r
 \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
 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
 grouped in other place (it's better than such mixing: code, data, code,\r
 data, ...).\r
 \r
@@ -319,19 +319,19 @@ data, ...).
 Filters\r
 -------\r
 You can increase the compression ratio for some data types, using\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
 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
 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
 It works in such manner:\r
 Compressing    = Filter_encoding + LZMA_encoding\r
@@ -339,11 +339,11 @@ Decompressing  = LZMA_decoding + Filter_decoding
 \r
 Compressing and decompressing speed of such filters is very high,\r
 so it will not increase decompressing time too much.\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
 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
 compressible.\r
 \r
 For some ISAs (for example, for MIPS) it's impossible to get gain from such filter.\r