Improve Extract7ZipArchive topic. Includes removal of the bit about fast extracting and block sizes because the function always extract all files.

This commit is contained in:
Martijn Laan 2025-01-06 10:07:07 +01:00
parent 8d0fcaf491
commit bce35b6fc3
2 changed files with 20 additions and 11 deletions

View File

@ -1893,17 +1893,20 @@ end;</pre>
<p>Return True to allow the extraction to continue, False otherwise.</p> <p>Return True to allow the extraction to continue, False otherwise.</p>
<p><tt>Extract7ZipArchive</tt> uses an embedded version of the &quot;7z ANSI-C Decoder&quot; from the LZMA SDK by Igor Pavlov, as-is, except that Unicode support and error messages were improved and that it outputs memory requirements.</p> <p><tt>Extract7ZipArchive</tt> uses an embedded version of the &quot;7z ANSI-C Decoder&quot; from the LZMA SDK by Igor Pavlov, as-is, except that Unicode support and error messages were improved and that it outputs memory requirements.</p>
<p>All output of the decoder is logged if logging is enabled, including error messages but excluding empty lines.</p> <p>All output of the decoder is logged if logging is enabled, including error messages but excluding empty lines.</p>
<p>The decoder has the following limitations, as written by Igor Pavlov in the LZMA SDK:<br /><br /> <p>The decoder has the following limitations, as written by Igor Pavlov in the LZMA SDK:</p>
-It reads only &quot;FileName&quot;, &quot;Size&quot;, &quot;LastWriteTime&quot; and &quot;CRC&quot; information for each file in archive.<br /> <ul>
-It does not support PPMd and BZip2 methods.<br /> <li>It reads only &quot;FileName&quot;, &quot;Size&quot;, &quot;LastWriteTime&quot; and &quot;CRC&quot; information for each file in archive.</li>
-It converts original UTF-16 Unicode file names to UTF-8 Unicode file names.<br /> <li>It does not support PPMd and BZip2 methods.</li>
-It decodes whole solid block from 7z archive to RAM. The RAM consumption can be high.</p> <li>It converts original UTF-16 Unicode file names to UTF-8 Unicode file names.</li>
<p>Additionally he wrote:<br /><br /> <li>It decodes whole solid block from 7z archive to RAM. The RAM consumption can be high.</li>
You can create .7z archive with 7z.exe, 7za.exe or 7zr.exe:<br /><br /> </ul>
7z.exe a archive.7z *.htm -r -mx -m0fb=255<br /><br /> <p>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 <tt>Extract7ZipArchive</tt> 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.</p>
If you have big number of files in archive, and you need fast extracting, you can use partly-solid archives:<br /><br /> <p>Additionally he wrote:</p>
7za.exe a archive.7z *.htm -ms=512K -r -mx -m0fb=255 -m0d=512K<br /><br /> <ul>
In that example 7-Zip will use 512KB solid blocks. So it needs to decompress only 512KB for extracting one file from such archive.</p></remarks> <li>You can create .7z archive with 7z.exe, 7za.exe or 7zr.exe:<br />
<tt>7z.exe a archive.7z *.htm -r -mx -m0fb=255</tt></li>
</ul>
</remarks>
<seealso><p><link topic="isxfunc_CreateExtractionPage">CreateExtractionPage</link><br /> <seealso><p><link topic="isxfunc_CreateExtractionPage">CreateExtractionPage</link><br />
<link topic="isxfunc_CreateDownloadPage">CreateDownloadPage</link><br /> <link topic="isxfunc_CreateDownloadPage">CreateDownloadPage</link><br />
<link topic="isxfunc_DownloadTemporaryFile">DownloadTemporaryFile</link><br /> <link topic="isxfunc_DownloadTemporaryFile">DownloadTemporaryFile</link><br />

View File

@ -139,6 +139,12 @@
<xsl:template match="tt"> <xsl:template match="tt">
<tt><xsl:apply-templates/></tt></xsl:template> <tt><xsl:apply-templates/></tt></xsl:template>
<xsl:template match="ul">
<ul><xsl:apply-templates/></ul></xsl:template>
<xsl:template match="li">
<li><xsl:apply-templates/></li></xsl:template>
<xsl:template match="br"> <xsl:template match="br">
<br /> <br />
</xsl:template> </xsl:template>