Przeglądaj źródła

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

Martijn Laan 8 miesięcy temu
rodzic
commit
bce35b6fc3
2 zmienionych plików z 20 dodań i 11 usunięć
  1. 14 11
      ISHelp/isxfunc.xml
  2. 6 0
      ISHelp/isxfunc.xsl

+ 14 - 11
ISHelp/isxfunc.xml

@@ -1893,17 +1893,20 @@ end;</pre>
 <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>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 />
--It reads only &quot;FileName&quot;, &quot;Size&quot;, &quot;LastWriteTime&quot; and &quot;CRC&quot; information for each file in archive.<br />
--It does not support PPMd and BZip2 methods.<br />
--It converts original UTF-16 Unicode file names to UTF-8 Unicode file names.<br />
--It decodes whole solid block from 7z archive to RAM. The RAM consumption can be high.</p>
-<p>Additionally he wrote:<br /><br />
-You can create .7z archive with 7z.exe, 7za.exe or 7zr.exe:<br /><br />
-7z.exe a archive.7z *.htm -r -mx -m0fb=255<br /><br />
-If you have big number of files in archive, and you need fast extracting, you can use partly-solid archives:<br /><br />
-7za.exe a archive.7z *.htm -ms=512K -r -mx -m0fb=255 -m0d=512K<br /><br />
-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>
+<p>The decoder has the following limitations, as written by Igor Pavlov in the LZMA SDK:</p>
+<ul>
+<li>It reads only &quot;FileName&quot;, &quot;Size&quot;, &quot;LastWriteTime&quot; and &quot;CRC&quot; information for each file in archive.</li>
+<li>It does not support PPMd and BZip2 methods.</li>
+<li>It converts original UTF-16 Unicode file names to UTF-8 Unicode file names.</li>
+<li>It decodes whole solid block from 7z archive to RAM. The RAM consumption can be high.</li>
+</ul>
+<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>
+<p>Additionally he wrote:</p>
+<ul>
+<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 />
 <link topic="isxfunc_CreateDownloadPage">CreateDownloadPage</link><br />
 <link topic="isxfunc_DownloadTemporaryFile">DownloadTemporaryFile</link><br />

+ 6 - 0
ISHelp/isxfunc.xsl

@@ -139,6 +139,12 @@
 <xsl:template match="tt">
 <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">
 <br />
 </xsl:template>