From 5b39dc76f1bc82f941d5c800ab9f34407a06b53a Mon Sep 17 00:00:00 2001 From: Igor Pavlov <87184205+ip7z@users.noreply.github.com> Date: Wed, 21 Jun 2023 00:00:00 +0000 Subject: 23.01 --- DOC/7zip.wxs | 2 +- DOC/Methods.txt | 7 +++++-- DOC/lzma.txt | 43 ++++++++++++++++++++++++++++++------------- DOC/readme.txt | 49 +++++++++++++++++++++++++------------------------ DOC/src-history.txt | 22 ++++++++++++++++++++++ 5 files changed, 83 insertions(+), 40 deletions(-) (limited to 'DOC') diff --git a/DOC/7zip.wxs b/DOC/7zip.wxs index 123182e..df1d320 100644 --- a/DOC/7zip.wxs +++ b/DOC/7zip.wxs @@ -1,6 +1,6 @@ - + diff --git a/DOC/Methods.txt b/DOC/Methods.txt index d4a1b1d..541f1c1 100644 --- a/DOC/Methods.txt +++ b/DOC/Methods.txt @@ -1,8 +1,8 @@ 7-Zip method IDs for 7z and xz archives --------------------------------------- -Version: 18.06 -Date: 2018-06-30 +Version: 23.01 +Date: 2023-06-30 Each compression or crypto method in 7z is associated with unique binary value (ID). The length of ID in bytes is arbitrary but it can not exceed 63 bits (8 bytes). @@ -37,6 +37,7 @@ List of defined IDs 07 - ARM (little-endian) 08 - ARMT (little-endian) 09 - SPARC +0A - ARM64 21 - LZMA2 @@ -88,6 +89,8 @@ List of defined IDs 0A - Imploding 0C - BZip2 (not used. Use {040202} instead) 0E - LZMA (LZMA-zip) + + 5D - ZSTD 5F - xz 60 - Jpeg 61 - WavPack diff --git a/DOC/lzma.txt b/DOC/lzma.txt index a65988f..142feb1 100644 --- a/DOC/lzma.txt +++ b/DOC/lzma.txt @@ -1,6 +1,6 @@ LZMA compression ---------------- -Version: 9.35 +Version: 23.01 This file describes LZMA encoding and decoding functions written in C language. @@ -169,12 +169,14 @@ How To compress data Compile files: 7zTypes.h Threads.h + Threads.c LzmaEnc.h LzmaEnc.c LzFind.h LzFind.c LzFindMt.h LzFindMt.c + LzFindOpt.c LzHash.h Memory Requirements: @@ -283,17 +285,26 @@ Return code: Defines ------- -_LZMA_SIZE_OPT - Enable some optimizations in LZMA Decoder to get smaller executable code. +Z7_LZMA_SIZE_OPT - Enable some code size optimizations in LZMA Decoder to get smaller executable code. -_LZMA_PROB32 - It can increase the speed on some 32-bit CPUs, but memory usage for - some structures will be doubled in that case. +Z7_LZMA_PROB32 - It can increase the speed on some 32-bit CPUs, but memory usage for + some structures will be doubled in that case. -_LZMA_UINT32_IS_ULONG - Define it if int is 16-bit on your compiler and long is 32-bit. +Z7_DECL_Int32_AS_long - Define it if int is 16-bit on your compiler and long is 32-bit. -_LZMA_NO_SYSTEM_SIZE_T - Define it if you don't want to use size_t type. +Z7_DECL_SizeT_AS_unsigned_int - Define it if you don't want to use size_t type. -_7ZIP_PPMD_SUPPPORT - Define it if you don't want to support PPMD method in AMSI-C .7z decoder. +Defines for 7z decoder written in C +----------------------------------- +These defines are for 7zDec.c only (the decoder in C). +C++ 7z decoder doesn't uses these macros. + +Z7_PPMD_SUPPORT - define it if you need PPMD method support. +Z7_NO_METHODS_FILTERS - do not use filters (except of BCJ2 filter). +Z7_USE_NATIVE_BRANCH_FILTER - use filter for native ISA: + use x86 filter, if compiled to x86 executable, + use arm64 filter, if compiled to arm64 executable. C++ LZMA Encoder/Decoder @@ -305,20 +316,26 @@ C++ LZMA code is just wrapper over ANSI-C code. C++ Notes ~~~~~~~~~~~~~~~~~~~~~~~~ -If you use some C++ code folders in 7-Zip (for example, C++ code for .7z handling), +If you use some C++ code folders in 7-Zip (for example, C++ code for 7z archive handling), you must check that you correctly work with "new" operator. 7-Zip can be compiled with MSVC 6.0 that doesn't throw "exception" from "new" operator. -So 7-Zip uses "CPP\Common\NewHandler.cpp" that redefines "new" operator: +So 7-Zip uses "CPP\Common\NewHandler.cpp" that redefines "new" operator, +if compiled by old MSVC compilers (MSVC before version VS 2010): + operator new(size_t size) { void *p = ::malloc(size); - if (p == 0) + if (!p) throw CNewException(); return p; } -If you use MSCV that throws exception for "new" operator, you can compile without -"NewHandler.cpp". So standard exception will be used. Actually some code of -7-Zip catches any exception in internal code and converts it to HRESULT code. + +If the compiler is VS 2010 or newer, NewHandler.cpp doesn't redefine "new" operator. +Sp if you use new compiler (VS 2010 or newer), you still can include "NewHandler.cpp" +to compilation, and it will not redefine operator new. +Also you can compile without "NewHandler.cpp" with new compilers. +If 7-zip doesn't redefine operator "new", standard exception will be used instead of CNewException. +Some code of 7-Zip catches any exception in internal code and converts it to HRESULT code. So you don't need to catch CNewException, if you call COM interfaces of 7-Zip. --- diff --git a/DOC/readme.txt b/DOC/readme.txt index faec8dc..5cd90c5 100644 --- a/DOC/readme.txt +++ b/DOC/readme.txt @@ -1,17 +1,18 @@ -7-Zip 22.01 Sources +7-Zip 23.01 Sources ------------------- 7-Zip is a file archiver for Windows. -7-Zip Copyright (C) 1999-2022 Igor Pavlov. +7-Zip Copyright (C) 1999-2023 Igor Pavlov. License Info ------------ 7-Zip is free software distributed under the GNU LGPL -(except for unRar code). -read License.txt for more infomation about license. +(except for unRar code). Also some code +is licensed under the "BSD 3-clause License". +Read "License.txt" for more infomation about license. Notes about unRAR license: @@ -46,13 +47,11 @@ How to compile in Windows ------------------------- To compile the sources to Windows binaries you need Visual Studio compiler and/or Windows SDK. -You can use latest Windows Studio 2017/2019 to compile binaries for x86, x64 and arm64 platforms. +You can use latest Windows Studio 2017/2019/2022 to compile binaries for x86, x64, arm64 and arm platforms. Also you can use old compilers for some platforms: x86 : Visual C++ 6.0 with Platform SDK x64 : Windows Server 2003 R2 Platform SDK - arm64 : Windows Studio 2017 - arm : Windows Studio 2017 - ia64 (itanium) : Windows Server 2003 R2 Platform SDK + ia64 (itanium) : Windows Server 2003 R2 Platform SDK arm for Windows CE : Standard SDK for Windows CE 5.0 If you use MSVC6, specify also Platform SDK directories at top of directories lists: @@ -70,7 +69,7 @@ There are two ways to compile 7-Zip binaries: 2) via dsp file in Visual Studio. The dsp file compiling can be used for development and debug purposes. -The final 7-Zip binaries are compiled via makefiles, that provide best +All final 7-Zip binaries are compiled via makefiles, that provide best optimization options. @@ -94,8 +93,8 @@ MY_DYNAMIC_LINK Compiling 7-Zip for Unix/Linux ------------------------------ -There are several otpions to compile 7-Zip with different compilers: gcc and clang. -Also 7-Zip code contains two versions for some critical parts of code: in C and in Assembeler. +There are several options to compile 7-Zip with different compilers: gcc and clang. +Also 7-Zip code contains two versions for some parts of code: in C and in Assembeler. So if you compile the version with Assembeler code, you will get faster 7-Zip binary. 7-Zip's assembler code uses the following syntax for different platforms: @@ -109,13 +108,14 @@ So if you compile the version with Assembeler code, you will get faster 7-Zip bi https://github.com/nidud/asmc 2) arm64: GNU assembler for ARM64 with preprocessor. - That systax of that arm64 assembler code in 7-Zip is supported by GCC and CLANG for ARM64. + That systax is supported by GCC and CLANG for ARM64. There are different binaries that can be compiled from 7-Zip source. There are 2 main files in folder for compiling: makefile - that can be used for compiling Windows version of 7-Zip with nmake command - makefile.gcc - that can be used for compiling Linux/macOS versions of 7-Zip with make command - + makefile.gcc - that can be used for compiling Linux/macOS versions of 7-Zip or Windows version + with MINGW (GCC) with make command. + At first you must change the current folder to folder that contains `makefile.gcc`: cd CPP/7zip/Bundles/Alone2 @@ -143,7 +143,7 @@ To compile 7-Zip for arm64 with assembler: To compile 7-Zip for arm64 for macOS: make -j -f ../../cmpl_mac_arm64.mak -Also you can change some compiler options in the mak files: +Also you can change some compiler options in the "mak" files: cmpl_gcc.mak var_gcc.mak warn_gcc.mak @@ -207,16 +207,17 @@ Description of 7-Zip sources package DOC Documentation --- - 7zFormat.txt - 7z format description - copying.txt - GNU LGPL license - unRarLicense.txt - License for unRAR part of source code + readme.txt - Readme file src-history.txt - Sources history + 7zC.txt - 7z ANSI-C Decoder description + 7zFormat.txt - 7z format description Methods.txt - Compression method IDs - readme.txt - Readme file lzma.txt - LZMA compression description - 7zip.nsi - installer script for NSIS - 7zip.wix - installer script for WIX - + License.txt - license information + copying.txt - GNU LGPL license + unRarLicense.txt - License for unRAR part of source code + 7zip.wxs - installer script for WIX + 7zip.hhp - html help project file Asm - Source code in Assembler : optimized code for CRC, SHA, AES, LZMA decoding. @@ -250,9 +251,9 @@ Windows common files for Windows related code SFXWin 7z.sfx: Windows 7z SFX module SFXSetup 7zS.sfx: Windows 7z SFX module for Installers - Compress files for compression/decompression + Compress files for compression / decompression - Crypto files for encryption / decompression + Crypto files for encryption / decryption UI diff --git a/DOC/src-history.txt b/DOC/src-history.txt index f546c4e..c1c1b71 100644 --- a/DOC/src-history.txt +++ b/DOC/src-history.txt @@ -1,6 +1,28 @@ HISTORY of the 7-Zip source code -------------------------------- +23.01 2023-06-20 +------------------------- +- All external macros for compiling C/C++ code of 7-Zip now have Z7_ prefix. +- 7-Zip COM interfaces now use new macros that allow to declare and implement COM interface. +- The code has been modified to compile with the maximum diagnostic warning level: + -Wall in MSVC and -Weverything in CLANG. + And some warning types are disabled in 2 files: + - C/Compiler.h for C/C++ code warnings. + - CPP/Common/Common.h for C++ code warnings. +- Linux/macOS versions of 7-Zip: IUnknown interface in new code doesn't use + virtual destructor that was used in previous 7-Zip and p7zip: + // virtual ~IUnknown() {} + So 7-Zip's dynamically linked shared libraries (codecs) are not compatible + between new 7-Zip for Linux/macOS and old 7-Zip (and p7zip). +- Some optimizations in filters code: BCJ, BCJ2, Swap* and opthers. +- If 7-Zip uses BCJ2 filter for big datasets compressing, it can use additional temp + files in system's TEMP folder. 7-Zip uses temp file for additional compressed + data stream, if size of such compressed stream is larger than predefined limit: + 16 MiB in 32-bit version, 4 GiB in 64-bit version. +- Some bugs were fixed. + + 22.00 2022-06-16 ------------------------- - 7-Zip interfaces now support high precision (1 ns) timestamps with reserved -- cgit v1.2.3-55-g6feb