From bce35b6fc305e9141b6b51bcb3fdaf7273f4f34b Mon Sep 17 00:00:00 2001 From: Martijn Laan <1092369+martijnlaan@users.noreply.github.com> Date: Mon, 6 Jan 2025 10:07:07 +0100 Subject: [PATCH] Improve Extract7ZipArchive topic. Includes removal of the bit about fast extracting and block sizes because the function always extract all files. --- ISHelp/isxfunc.xml | 25 ++++++++++++++----------- ISHelp/isxfunc.xsl | 6 ++++++ 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/ISHelp/isxfunc.xml b/ISHelp/isxfunc.xml index 196de61eb..e60584123 100644 --- a/ISHelp/isxfunc.xml +++ b/ISHelp/isxfunc.xml @@ -1893,17 +1893,20 @@ end;

Return True to allow the extraction to continue, False otherwise.

Extract7ZipArchive uses an embedded version of the "7z ANSI-C Decoder" from the LZMA SDK by Igor Pavlov, as-is, except that Unicode support and error messages were improved and that it outputs memory requirements.

All output of the decoder is logged if logging is enabled, including error messages but excluding empty lines.

-

The decoder has the following limitations, as written by Igor Pavlov in the LZMA SDK:

--It reads only "FileName", "Size", "LastWriteTime" and "CRC" information for each file in archive.
--It does not support PPMd and BZip2 methods.
--It converts original UTF-16 Unicode file names to UTF-8 Unicode file names.
--It decodes whole solid block from 7z archive to RAM. The RAM consumption can be high.

-

Additionally he wrote:

-You can create .7z archive with 7z.exe, 7za.exe or 7zr.exe:

-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:

-7za.exe a archive.7z *.htm -ms=512K -r -mx -m0fb=255 -m0d=512K

-In that example 7-Zip will use 512KB solid blocks. So it needs to decompress only 512KB for extracting one file from such archive.

+

The decoder has the following limitations, as written by Igor Pavlov in the LZMA SDK:

+ +

To expand on his comments about RAM consumption: When extracting a file, at least enough memory will always be allocated to hold the entire file, regardless of the block size. For example, extracting a 1 GB file using Extract7ZipArchive requires at least 1 GB of RAM. Consider using a different solution for extracting large files, such as embedding 7-Zip itself, which does not use as much RAM, into your installation.

+

Additionally he wrote:

+ +

CreateExtractionPage
CreateDownloadPage
DownloadTemporaryFile
diff --git a/ISHelp/isxfunc.xsl b/ISHelp/isxfunc.xsl index cdb630117..96d2b5b91 100644 --- a/ISHelp/isxfunc.xsl +++ b/ISHelp/isxfunc.xsl @@ -139,6 +139,12 @@ + +

+ + +
  • +