diff --git a/C/7zVersion.h b/C/7zVersion.h index e0fa2412..75a768cf 100644 --- a/C/7zVersion.h +++ b/C/7zVersion.h @@ -1,9 +1,9 @@ #define MY_VER_MAJOR 9 -#define MY_VER_MINOR 34 +#define MY_VER_MINOR 35 #define MY_VER_BUILD 00 -#define MY_VERSION "9.34 alpha" -// #define MY_7ZIP_VERSION "9.34 alpha" -#define MY_DATE "2014-06-22" +#define MY_VERSION "9.35 beta" +// #define MY_7ZIP_VERSION "9.35" +#define MY_DATE "2014-12-07" #undef MY_COPYRIGHT #undef MY_VERSION_COPYRIGHT_DATE #define MY_COPYRIGHT ": Igor Pavlov : Public domain" diff --git a/C/Util/7z/makefile b/C/Util/7z/makefile index 9009da83..e0aa1e37 100644 --- a/C/Util/7z/makefile +++ b/C/Util/7z/makefile @@ -1,4 +1,4 @@ -MY_STATIC_LINK=1 +# MY_STATIC_LINK=1 CFLAGS = $(CFLAGS) -D_7ZIP_PPMD_SUPPPORT PROG = 7zDec.exe diff --git a/C/Util/Lzma/makefile b/C/Util/Lzma/makefile index afac0716..47953227 100644 --- a/C/Util/Lzma/makefile +++ b/C/Util/Lzma/makefile @@ -1,4 +1,4 @@ -MY_STATIC_LINK=1 +# MY_STATIC_LINK=1 PROG = LZMAc.exe CFLAGS = $(CFLAGS) \ diff --git a/C/Util/SfxSetup/SfxSetup.c b/C/Util/SfxSetup/SfxSetup.c index 32fb56ed..570bd70f 100644 --- a/C/Util/SfxSetup/SfxSetup.c +++ b/C/Util/SfxSetup/SfxSetup.c @@ -1,5 +1,5 @@ /* SfxSetup.c - 7z SFX Setup -2014-06-15 : Igor Pavlov : Public domain */ +2014-12-07 : Igor Pavlov : Public domain */ #include "Precomp.h" @@ -21,28 +21,28 @@ #include "../../7zFile.h" #include "../../CpuArch.h" -#define k_EXE_ExtIndex 1 +#define k_EXE_ExtIndex 2 static const char *kExts[] = { - "bat", - "cmd", - "exe", - "inf", - "msi", + "bat" + , "cmd" + , "exe" + , "inf" + , "msi" #ifdef UNDER_CE - "cab", + , "cab" #endif - "html", - "htm" + , "html" + , "htm" }; static const char *kNames[] = { - "setup", - "install", - "run", - "start" + "setup" + , "install" + , "run" + , "start" }; static unsigned FindExt(const wchar_t *s, unsigned *extLen) @@ -190,7 +190,7 @@ static WRes RemoveDirWithSubItems(WCHAR *path) wcscpy(path + len, fd.cFileName); if ((fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) != 0) { - wcscat(path, L"\\"); + wcscat(path, WSTRING_PATH_SEPARATOR); res = RemoveDirWithSubItems(path); } else @@ -324,7 +324,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, continue; if (CreateDirectoryW(path, NULL)) { - wcscat(path, L"\\"); + wcscat(path, WSTRING_PATH_SEPARATOR); pathLen = wcslen(path); break; } diff --git a/CPP/7zip/Archive/7z/7zHandler.cpp b/CPP/7zip/Archive/7z/7zHandler.cpp index 82983419..af673a73 100644 --- a/CPP/7zip/Archive/7z/7zHandler.cpp +++ b/CPP/7zip/Archive/7z/7zHandler.cpp @@ -321,11 +321,16 @@ STDMETHODIMP CHandler::GetRawProp(UInt32 index, PROPID propID, const void **data if (/* _db.IsTree && propID == kpidName || !_db.IsTree && */ propID == kpidPath) { - *data = (void *)_db.GetName(index); - if (*data) + const wchar_t *name = _db.GetName(index); + if (name) { - *dataSize = (UInt32)((_db.NameOffsets[index + 1] - _db.NameOffsets[index]) * 2); - *propType = NPropDataType::kUtf16z; + size_t size = (_db.NameOffsets[index + 1] - _db.NameOffsets[index]) * 2; + if (size < ((UInt32)1 << 31)) + { + *data = (void *)name; + *dataSize = (UInt32)size; + *propType = NPropDataType::kUtf16z; + } } return S_OK; } @@ -382,6 +387,13 @@ HRESULT CHandler::SetMethodToProp(CNum folderIndex, PROPVARIANT *prop) const for (unsigned j = 0; j < idSize; j++) id64 = ((id64 << 8) | longID[j]); inByte.SkipDataNoCheck(idSize); + + if ((mainByte & 0x10) != 0) + { + inByte.ReadNum(); // NumInStreams + inByte.ReadNum(); // NumOutStreams + } + CNum propsSize = 0; const Byte *props = NULL; if ((mainByte & 0x20) != 0) diff --git a/CPP/7zip/Archive/Iso/IsoHandler.cpp b/CPP/7zip/Archive/Iso/IsoHandler.cpp index fc984048..eaa94bd8 100644 --- a/CPP/7zip/Archive/Iso/IsoHandler.cpp +++ b/CPP/7zip/Archive/Iso/IsoHandler.cpp @@ -322,7 +322,7 @@ STDMETHODIMP CHandler::Extract(const UInt32 *indices, UInt32 numItems, if (e != 0) lps->InSize = lps->OutSize = currentTotalSize + offset; const CDir &item2 = ref.Dir->_subItems[ref.Index + e]; - RINOK(_stream->Seek(item2.ExtentLocation * _archive.BlockSize, STREAM_SEEK_SET, NULL)); + RINOK(_stream->Seek((UInt64)item2.ExtentLocation * _archive.BlockSize, STREAM_SEEK_SET, NULL)); streamSpec->Init(item2.Size); RINOK(copyCoder->Code(inStream, realOutStream, NULL, NULL, progress)); if (copyCoderSpec->TotalSize != item2.Size) diff --git a/CPP/7zip/Archive/Zip/ZipUpdate.cpp b/CPP/7zip/Archive/Zip/ZipUpdate.cpp index 2978e387..97cce5ac 100644 --- a/CPP/7zip/Archive/Zip/ZipUpdate.cpp +++ b/CPP/7zip/Archive/Zip/ZipUpdate.cpp @@ -534,13 +534,14 @@ static HRESULT Update2( #ifndef _7ZIP_ST - const size_t kNumMaxThreads = (1 << 10); UInt32 numThreads = options->NumThreads; + const UInt32 kNumMaxThreads = 64; if (numThreads > kNumMaxThreads) numThreads = kNumMaxThreads; + if (numThreads > MAXIMUM_WAIT_OBJECTS) // is 64 in Windows (is it 64 in all versions?) + numThreads = MAXIMUM_WAIT_OBJECTS; if (numThreads < 1) numThreads = 1; - const size_t kMemPerThread = (1 << 25); const size_t kBlockSize = 1 << 16; diff --git a/CPP/7zip/Bundles/Alone7z/makefile b/CPP/7zip/Bundles/Alone7z/makefile index 9f7ef516..84b235eb 100644 --- a/CPP/7zip/Bundles/Alone7z/makefile +++ b/CPP/7zip/Bundles/Alone7z/makefile @@ -1,6 +1,6 @@ PROG = 7zr.exe MY_CONSOLE = 1 -CFLAGS = $(CFLAGS) \ +CFLAGS = $(CFLAGS) -DPROG_VARIANT_R !IFNDEF UNDER_CE CFLAGS = $(CFLAGS) -DWIN_LONG_PATH diff --git a/CPP/7zip/Bundles/LzmaCon/resource.rc b/CPP/7zip/Bundles/LzmaCon/resource.rc index 43b50738..c68fdcc0 100644 --- a/CPP/7zip/Bundles/LzmaCon/resource.rc +++ b/CPP/7zip/Bundles/LzmaCon/resource.rc @@ -1,3 +1,3 @@ -#include "../../MyVersionInfo.rc" +#include "../../../../C/7zVersion.rc" MY_VERSION_INFO_APP("LZMA", "lzma") diff --git a/CPP/7zip/Bundles/SFXCon/resource.rc b/CPP/7zip/Bundles/SFXCon/resource.rc index 58331b81..a83581c2 100644 --- a/CPP/7zip/Bundles/SFXCon/resource.rc +++ b/CPP/7zip/Bundles/SFXCon/resource.rc @@ -1,4 +1,4 @@ -#include "../../MyVersionInfo.rc" +#include "../../../../C/7zVersion.rc" MY_VERSION_INFO_APP("7z Console SFX", "7z.sfx") diff --git a/CPP/7zip/Bundles/SFXSetup/resource.rc b/CPP/7zip/Bundles/SFXSetup/resource.rc index 47e1b762..8819a2c8 100644 --- a/CPP/7zip/Bundles/SFXSetup/resource.rc +++ b/CPP/7zip/Bundles/SFXSetup/resource.rc @@ -1,4 +1,4 @@ -#include "../../MyVersionInfo.rc" +#include "../../../../C/7zVersion.rc" #include "resource.h" MY_VERSION_INFO_APP("7z Setup SFX", "7zS.sfx") diff --git a/CPP/7zip/Bundles/SFXWin/resource.rc b/CPP/7zip/Bundles/SFXWin/resource.rc index 91292b2f..ccde0cb2 100644 --- a/CPP/7zip/Bundles/SFXWin/resource.rc +++ b/CPP/7zip/Bundles/SFXWin/resource.rc @@ -1,4 +1,4 @@ -#include "../../MyVersionInfo.rc" +#include "../../../../C/7zVersion.rc" #include "../../GuiCommon.rc" #include "../../UI/GUI/ExtractDialogRes.h" #include "../../UI/FileManager/PropertyNameRes.h" diff --git a/CPP/7zip/UI/Agent/Agent.cpp b/CPP/7zip/UI/Agent/Agent.cpp index e4f46f0a..d8221754 100644 --- a/CPP/7zip/UI/Agent/Agent.cpp +++ b/CPP/7zip/UI/Agent/Agent.cpp @@ -195,6 +195,8 @@ STDMETHODIMP_(UInt64) CAgentFolder::GetItemSize(UInt32 index) const CProxyFolder &item = _proxyArchive->Folders[folder->Folders[realIndex]]; if (!_flatMode) return item.Size; + if (!item.IsLeaf) + return 0; arcIndex = item.Index; } else diff --git a/CPP/7zip/UI/Client7z/resource.rc b/CPP/7zip/UI/Client7z/resource.rc index a09bb044..1bb4d4e3 100644 --- a/CPP/7zip/UI/Client7z/resource.rc +++ b/CPP/7zip/UI/Client7z/resource.rc @@ -1,3 +1,3 @@ -#include "../../MyVersionInfo.rc" +#include "../../../../C/7zVersion.rc" MY_VERSION_INFO_APP("7-Zip client", "7zcl") diff --git a/CPP/7zip/UI/Common/DirItem.h b/CPP/7zip/UI/Common/DirItem.h index 4bb62b0e..ce48b582 100644 --- a/CPP/7zip/UI/Common/DirItem.h +++ b/CPP/7zip/UI/Common/DirItem.h @@ -24,7 +24,7 @@ struct CDirItem CByteBuffer ReparseData; CByteBuffer ReparseData2; // fixed (reduced) absolute links - bool AreReparseData() const { return ReparseData.Size() != 0 || !ReparseData2.Size() != 0; } + bool AreReparseData() const { return ReparseData.Size() != 0 || ReparseData2.Size() != 0; } #endif UInt32 Attrib; diff --git a/CPP/7zip/UI/Console/Main.cpp b/CPP/7zip/UI/Console/Main.cpp index 0038dba4..2f56fecb 100644 --- a/CPP/7zip/UI/Console/Main.cpp +++ b/CPP/7zip/UI/Console/Main.cpp @@ -43,11 +43,7 @@ #include "HashCon.h" -#if !defined(EXTERNAL_CODECS) && defined(_NO_CRYPTO) -#define IT_IS_REDUCED_VERSION -#endif - -#ifdef IT_IS_REDUCED_VERSION +#ifdef PROG_VARIANT_R #include "../../../../C/7zVersion.h" #else #include "../../MyVersion.h" @@ -64,7 +60,7 @@ extern CStdOutStream *g_StdStream; static const char *kCopyrightString = "\n7-Zip" #ifndef EXTERNAL_CODECS -#ifdef IT_IS_REDUCED_VERSION +#ifdef PROG_VARIANT_R " (r)" #else " (a)" @@ -80,7 +76,7 @@ static const char *kCopyrightString = "\n7-Zip" static const char *kHelpString = "\nUsage: 7z" #ifndef EXTERNAL_CODECS -#ifdef IT_IS_REDUCED_VERSION +#ifdef PROG_VARIANT_R "r" #else "a" diff --git a/DOC/7zC.txt b/DOC/7zC.txt index d929b254..939b720f 100644 --- a/DOC/7zC.txt +++ b/DOC/7zC.txt @@ -1,4 +1,4 @@ -7z ANSI-C Decoder 9.24 +7z ANSI-C Decoder 9.35 ---------------------- 7z ANSI-C provides 7z/LZMA decoding. @@ -29,11 +29,9 @@ Files How To Use ---------- -You must download 7-Zip program from www.7-zip.org. +You can create .7z archive with 7z.exe, 7za.exe or 7zr.exe: -You can create .7z archive with 7z.exe or 7za.exe: - - 7za.exe a archive.7z *.htm -r -mx -m0fb=255 + 7z.exe a archive.7z *.htm -r -mx -m0fb=255 If you have big number of files in archive, and you need fast extracting, you can use partly-solid archives: diff --git a/DOC/7zip.inf b/DOC/7zip.inf deleted file mode 100644 index e3b63a10..00000000 --- a/DOC/7zip.inf +++ /dev/null @@ -1,55 +0,0 @@ -[CODE] - -[Version] -Signature = "$Windows NT$" -Provider = "7-zip.org" -CESignature = "$Windows CE$" - -[CEStrings] -AppName = "7-Zip" -InstallDir = %CE1%\%AppName% - -[Strings] -AppVer = "9.23" -AppDate = "2011-06-17" - -[CEDevice] -; ProcessorType = 2577 ; ARM -VersionMin = 3.0 -BuildMin = 0.0 -VersionMax = 1000.0 -BuildMax = 0xE0000000 - -[DefaultInstall] -CopyFiles = CopyFilesSection,CopyFilesSection.Lang -AddReg = RegSettings -CEShortcuts = Shortcuts - -[SourceDisksNames] -1 = ,"Common files",,"." -2 = ,"Lang files",,"Lang" - -[SourceDisksFiles] -7zFM.exe = 1 -7z.sfx = 1 -7zS2.sfx = 1 -ru.txt = 2 - -[DestinationDirs] -DefaultDestDir = ,%InstallDir% -CopyFilesSection = ,%InstallDir% -CopyFilesSection.Lang = ,"%InstallDir%\Lang" -Shortcuts = ,%CE11% - -[CopyFilesSection] -7zFM.exe -7z.sfx -7zS2.sfx - -[CopyFilesSection.Lang] -ru.txt - -[RegSettings] - -[Shortcuts] -7-Zip,0,7zFM.exe diff --git a/DOC/7zip.nsi b/DOC/7zip.nsi index a805c949..39701459 100644 --- a/DOC/7zip.nsi +++ b/DOC/7zip.nsi @@ -2,8 +2,8 @@ ;Defines !define VERSION_MAJOR 9 -!define VERSION_MINOR 34 -!define VERSION_POSTFIX_FULL " alpha" +!define VERSION_MINOR 35 +!define VERSION_POSTFIX_FULL " beta" !ifdef WIN64 !ifdef IA64 !define VERSION_SYS_POSTFIX_FULL " for Windows IA-64" @@ -315,7 +315,7 @@ noScErrors: WriteRegStr HKCR "*\shellex\ContextMenuHandlers\7-Zip" "" "${CLSID_CONTEXT_MENU}" WriteRegStr HKCR "Directory\shellex\ContextMenuHandlers\7-Zip" "" "${CLSID_CONTEXT_MENU}" - ; WriteRegStr HKCR "Folder\shellex\ContextMenuHandlers\7-Zip" "" "${CLSID_CONTEXT_MENU}" + WriteRegStr HKCR "Folder\shellex\ContextMenuHandlers\7-Zip" "" "${CLSID_CONTEXT_MENU}" WriteRegStr HKCR "Directory\shellex\DragDropHandlers\7-Zip" "" "${CLSID_CONTEXT_MENU}" WriteRegStr HKCR "Drive\shellex\DragDropHandlers\7-Zip" "" "${CLSID_CONTEXT_MENU}" diff --git a/DOC/7zip.wxs b/DOC/7zip.wxs index 3154a324..d48e0c81 100644 --- a/DOC/7zip.wxs +++ b/DOC/7zip.wxs @@ -1,7 +1,7 @@ - + @@ -67,6 +67,7 @@ + @@ -144,6 +145,12 @@ Value="$(var.ShellExtId)" /> + + + + + file LZMA compressing/decompressing program for Windows system - - -UNIX/Linux version ------------------- -To compile C++ version of file->file LZMA encoding, go to directory -CPP/7zip/Bundles/LzmaCon -and call make to recompile it: - make -f makefile.gcc clean all - -In some UNIX/Linux versions you must compile LZMA with static libraries. -To compile with static libraries, you can use -LIB = -lm -static - - -Files ---------------------- -lzma.txt - LZMA SDK description (this file) -7zFormat.txt - 7z Format description -7zC.txt - 7z ANSI-C Decoder description -methods.txt - Compression method IDs for .7z -lzma.exe - Compiled file->file LZMA encoder/decoder for Windows -7zr.exe - 7-Zip with 7z/lzma/xz support. -history.txt - history of the LZMA SDK - - -Source code structure ---------------------- - -C/ - C files - 7zCrc*.* - CRC code - Alloc.* - Memory allocation functions - Bra*.* - Filters for x86, IA-64, ARM, ARM-Thumb, PowerPC and SPARC code - LzFind.* - Match finder for LZ (LZMA) encoders - LzFindMt.* - Match finder for LZ (LZMA) encoders for multithreading encoding - LzHash.h - Additional file for LZ match finder - LzmaDec.* - LZMA decoding - LzmaEnc.* - LZMA encoding - LzmaLib.* - LZMA Library for DLL calling - Types.h - Basic types for another .c files - Threads.* - The code for multithreading. - - LzmaLib - LZMA Library (.DLL for Windows) - - LzmaUtil - LZMA Utility (file->file LZMA encoder/decoder). - - Archive - files related to archiving - 7z - 7z ANSI-C Decoder - -CPP/ -- CPP files - - Common - common files for C++ projects - Windows - common files for Windows related code - - 7zip - files related to 7-Zip Project - - Common - common files for 7-Zip - - Compress - files related to compression/decompression - - Archive - files related to archiving - - Common - common files for archive handling - 7z - 7z C++ Encoder/Decoder - - Bundles - Modules that are bundles of other modules - - Alone7z - 7zr.exe: Standalone version of 7z.exe that supports only 7z/LZMA/BCJ/BCJ2 - LzmaCon - lzma.exe: LZMA compression/decompression - Format7zR - 7zr.dll: Reduced version of 7za.dll: extracting/compressing to 7z/LZMA/BCJ/BCJ2 - Format7zExtractR - 7zxr.dll: Reduced version of 7zxa.dll: extracting from 7z/LZMA/BCJ/BCJ2. - - UI - User Interface files - - Client7z - Test application for 7za.dll, 7zr.dll, 7zxr.dll - Common - Common UI files - Console - Code for console archiver - - - -CS/ - C# files - 7zip - Common - some common files for 7-Zip - Compress - files related to compression/decompression - LZ - files related to LZ (Lempel-Ziv) compression algorithm - LZMA - LZMA compression/decompression - LzmaAlone - file->file LZMA compression/decompression - RangeCoder - Range Coder (special code of compression/decompression) - -Java/ - Java files - SevenZip - Compression - files related to compression/decompression - LZ - files related to LZ (Lempel-Ziv) compression algorithm - LZMA - LZMA compression/decompression - RangeCoder - Range Coder (special code of compression/decompression) - - -C/C++ source code of LZMA SDK is part of 7-Zip project. -7-Zip source code can be downloaded from 7-Zip's SourceForge page: - - http://sourceforge.net/projects/sevenzip/ - - - -LZMA features -------------- - - Variable dictionary size (up to 1 GB) - - Estimated compressing speed: about 2 MB/s on 2 GHz CPU - - Estimated decompressing speed: - - 20-30 MB/s on 2 GHz Core 2 or AMD Athlon 64 - - 1-2 MB/s on 200 MHz ARM, MIPS, PowerPC or other simple RISC - - Small memory requirements for decompressing (16 KB + DictionarySize) - - Small code size for decompressing: 5-8 KB - -LZMA decoder uses only integer operations and can be -implemented in any modern 32-bit CPU (or on 16-bit CPU with some conditions). - -Some critical operations that affect the speed of LZMA decompression: - 1) 32*16 bit integer multiply - 2) Misspredicted branches (penalty mostly depends from pipeline length) - 3) 32-bit shift and arithmetic operations - -The speed of LZMA decompressing mostly depends from CPU speed. -Memory speed has no big meaning. But if your CPU has small data cache, -overall weight of memory speed will slightly increase. - - -How To Use ----------- - -Using LZMA encoder/decoder executable --------------------------------------- - -Usage: LZMA inputFile outputFile [...] - - e: encode file - - d: decode file - - b: Benchmark. There are two tests: compressing and decompressing - with LZMA method. Benchmark shows rating in MIPS (million - instructions per second). Rating value is calculated from - measured speed and it is normalized with Intel's Core 2 results. - Also Benchmark checks possible hardware errors (RAM - errors in most cases). Benchmark uses these settings: - (-a1, -d21, -fb32, -mfbt4). You can change only -d parameter. - Also you can change the number of iterations. Example for 30 iterations: - LZMA b 30 - Default number of iterations is 10. - - - - - -a{N}: set compression mode 0 = fast, 1 = normal - default: 1 (normal) - - d{N}: Sets Dictionary size - [0, 30], default: 23 (8MB) - The maximum value for dictionary size is 1 GB = 2^30 bytes. - Dictionary size is calculated as DictionarySize = 2^N bytes. - For decompressing file compressed by LZMA method with dictionary - size D = 2^N you need about D bytes of memory (RAM). - - -fb{N}: set number of fast bytes - [5, 273], default: 128 - Usually big number gives a little bit better compression ratio - and slower compression process. - - -lc{N}: set number of literal context bits - [0, 8], default: 3 - Sometimes lc=4 gives gain for big files. - - -lp{N}: set number of literal pos bits - [0, 4], default: 0 - lp switch is intended for periodical data when period is - equal 2^N. For example, for 32-bit (4 bytes) - periodical data you can use lp=2. Often it's better to set lc0, - if you change lp switch. - - -pb{N}: set number of pos bits - [0, 4], default: 2 - pb switch is intended for periodical data - when period is equal 2^N. - - -mf{MF_ID}: set Match Finder. Default: bt4. - Algorithms from hc* group doesn't provide good compression - ratio, but they often works pretty fast in combination with - fast mode (-a0). - - Memory requirements depend from dictionary size - (parameter "d" in table below). - - MF_ID Memory Description - - bt2 d * 9.5 + 4MB Binary Tree with 2 bytes hashing. - bt3 d * 11.5 + 4MB Binary Tree with 3 bytes hashing. - bt4 d * 11.5 + 4MB Binary Tree with 4 bytes hashing. - hc4 d * 7.5 + 4MB Hash Chain with 4 bytes hashing. - - -eos: write End Of Stream marker. By default LZMA doesn't write - eos marker, since LZMA decoder knows uncompressed size - stored in .lzma file header. - - -si: Read data from stdin (it will write End Of Stream marker). - -so: Write data to stdout - - -Examples: - -1) LZMA e file.bin file.lzma -d16 -lc0 - -compresses file.bin to file.lzma with 64 KB dictionary (2^16=64K) -and 0 literal context bits. -lc0 allows to reduce memory requirements -for decompression. - - -2) LZMA e file.bin file.lzma -lc0 -lp2 - -compresses file.bin to file.lzma with settings suitable -for 32-bit periodical data (for example, ARM or MIPS code). - -3) LZMA d file.lzma file.bin - -decompresses file.lzma to file.bin. - - -Compression ratio hints ------------------------ - -Recommendations ---------------- - -To increase the compression ratio for LZMA compressing it's desirable -to have aligned data (if it's possible) and also it's desirable to locate -data in such order, where code is grouped in one place and data is -grouped in other place (it's better than such mixing: code, data, code, -data, ...). - - -Filters -------- -You can increase the compression ratio for some data types, using -special filters before compressing. For example, it's possible to -increase the compression ratio on 5-10% for code for those CPU ISAs: -x86, IA-64, ARM, ARM-Thumb, PowerPC, SPARC. - -You can find C source code of such filters in C/Bra*.* files - -You can check the compression ratio gain of these filters with such -7-Zip commands (example for ARM code): -No filter: - 7z a a1.7z a.bin -m0=lzma - -With filter for little-endian ARM code: - 7z a a2.7z a.bin -m0=arm -m1=lzma - -It works in such manner: -Compressing = Filter_encoding + LZMA_encoding -Decompressing = LZMA_decoding + Filter_decoding - -Compressing and decompressing speed of such filters is very high, -so it will not increase decompressing time too much. -Moreover, it reduces decompression time for LZMA_decoding, -since compression ratio with filtering is higher. - -These filters convert CALL (calling procedure) instructions -from relative offsets to absolute addresses, so such data becomes more -compressible. - -For some ISAs (for example, for MIPS) it's impossible to get gain from such filter. +Also you can look source code for LZMA encoding and decoding: + C/Util/Lzma/LzmaUtil.c LZMA compressed file format @@ -313,6 +24,7 @@ Offset Size Description 13 Compressed data + ANSI-C LZMA Decoder ~~~~~~~~~~~~~~~~~~~ @@ -322,7 +34,9 @@ from sourceforge.net site. To use ANSI-C LZMA Decoder you need the following files: 1) LzmaDec.h + LzmaDec.c + Types.h -LzmaUtil/LzmaUtil.c is example application that uses these files. + +Look example code: + C/Util/Lzma/LzmaUtil.c Memory requirements for LZMA decoding @@ -445,7 +159,8 @@ Memory Requirements: 4) Free all allocated structures LzmaDec_Free(&state, &g_Alloc); -For full code example, look at C/LzmaUtil/LzmaUtil.c code. +Look example code: + C/Util/Lzma/LzmaUtil.c How To compress data @@ -478,7 +193,8 @@ It's OK to use same allocator for alloc and allocBig. Single-call Compression with callbacks -------------------------------------- -Check C/LzmaUtil/LzmaUtil.c as example, +Look example code: + C/Util/Lzma/LzmaUtil.c When to use: file->file compressing diff --git a/DOC/readme.txt b/DOC/readme.txt index ec0d4716..bd677df5 100644 --- a/DOC/readme.txt +++ b/DOC/readme.txt @@ -1,9 +1,9 @@ -7-Zip 9.32 Sources +7-Zip 9.35 Sources ------------------ 7-Zip is a file archiver for Windows. -7-Zip Copyright (C) 1999-2013 Igor Pavlov. +7-Zip Copyright (C) 1999-2014 Igor Pavlov. License Info @@ -36,11 +36,10 @@ In brief it means: LZMA SDK -------- -Also this package contains files from LZMA SDK -you can download LZMA SDK from this page: -http://www.7-zip.org/sdk.html -read about addtional licenses for LZMA SDK in file -DOC/lzma.txt +This package also contains some files from LZMA SDK +You can download LZMA SDK from: + http://www.7-zip.org/sdk.html +LZMA SDK is written and placed in the public domain by Igor Pavlov. How to compile @@ -98,82 +97,60 @@ DOC Documentation 7zFormat.txt - 7z format description copying.txt - GNU LGPL license unRarLicense.txt - License for unRAR part of source code - history.txt - Sources history + src-history.txt - Sources history Methods.txt - Compression method IDs readme.txt - Readme file - lzma.txt - LZMA SDK description + lzma.txt - LZMA compression description 7zip.nsi - installer script for NSIS + 7zip.wix - installer script for WIX +Asm - Source code in Assembler (optimized code for CRC calculation and Intel-AES encryption) + C - Source code in C -CPP - Source code in CPP -Common Common modules -Windows Win32 wrappers +CPP - Source code in C++ + +Common common files for C++ projects + +Windows common files for Windows related code 7zip -------- + Common Common modules for 7-zip - Archive 7-Zip Archive Format Plugins - -------- - Common - 7z - Arj - BZip2 - Cab - Cpio - GZip - Rar - Rpm - Split - Tar - Zip + Archive files related to archiving - Bundle Modules that are bundles of other modules - ------ - Alone 7za.exe: Standalone version of 7z - Alone7z 7zr.exe: Standalone version of 7z that supports only 7z/LZMA/BCJ/BCJ2 + Bundle Modules that are bundles of other modules (files) + + Alone 7za.exe: Standalone version of 7-Zip console that supports only 7z/xz/cab/zip/gzip/bzip2/tar. + Alone7z 7zr.exe: Standalone version of 7-Zip console that supports only 7z (reduced version) + Fm Standalone version of 7-Zip File Manager + Format7z 7za.dll: .7z support + Format7zExtract 7zxa.dll: .7z support, extracting only + Format7zR 7zr.dll: .7z support, reduced version + Format7zExtractR 7zxr.dll: .7z support, reduced version, extracting only + Format7zF 7z.dll: all formats + LzmaCon lzma.exe: LZMA compression/decompression SFXCon 7zCon.sfx: Console 7z SFX module SFXWin 7z.sfx: Windows 7z SFX module SFXSetup 7zS.sfx: Windows 7z SFX module for Installers - Format7z 7za.dll: .7z support - Format7zExtract 7zxa.dll: .7z support, extracting only - Format7zR 7zr.dll: .7z support, LZMA/BCJ* only - Format7zExtractR 7zxr.dll: .7z support, LZMA/BCJ* only, extracting only - Format7zF 7z.dll: all formats + + Compress files for compression/decompression + + Crypto files for encryption / decompression UI - -- + Agent Intermediary modules for FAR plugin and Explorer plugin - Console 7z.exe Console version - Explorer Explorer plugin - Resource Resources - Far FAR plugin Client7z Test application for 7za.dll + Common Common UI files + Console 7z.exe : Console version + Explorer 7-zip.dll: 7-Zip Shell extension + Far plugin for Far Manager + FileManager 7zFM.exe: 7-Zip File Manager + GUI 7zG.exe: 7-Zip GUI version - Compress - -------- - BZip2 BZip2 compressor - Branch Branch converter - ByteSwap Byte Swap converter - Copy Copy coder - Deflate - Implode - Arj - LZMA - PPMd Dmitry Shkarin's PPMdH with small changes. - LZ Lempel - Ziv - - Crypto Crypto modules - ------ - 7zAES Cipher for 7z - AES AES Cipher - Rar20 Cipher for Rar 2.0 - RarAES Cipher for Rar 3.0 - Zip Cipher for Zip - - FileManager File Manager --- diff --git a/DOC/history.txt b/DOC/src-history.txt similarity index 99% rename from DOC/history.txt rename to DOC/src-history.txt index 27a0e6c4..6b51293d 100644 --- a/DOC/history.txt +++ b/DOC/src-history.txt @@ -1,5 +1,5 @@ -Sources history of the 7-Zip ----------------------------- +HISTORY of the 7-Zip source code +-------------------------------- 9.31 2012-10-31 -------------------------