blob: 83fa8e9c820a96efe7f2fe0662ad2244a28f17e6 (
plain)
1
2
3
4
5
6
7
8
9
10
|
<h3 class="section">Dealing With Compressed Data</h3> <p>When <code>auto-compression-mode</code> is enabled, Emacs automatically uncompresses compressed files when you visit them, and automatically recompresses them if you alter and save them. See <a href="https://www.gnu.org/software/emacs/manual/html_node/emacs/Compressed-Files.html#Compressed-Files">Compressed Files</a> in <cite>The GNU Emacs Manual</cite>. </p> <p>The above feature works by calling an external executable (e.g., <code>gzip</code>). Emacs can also be compiled with support for built-in decompression using the zlib library, which is faster than calling an external program. </p> <dl> <dt id="zlib-available-p">Function: <strong>zlib-available-p</strong>
</dt> <dd><p>This function returns non-<code>nil</code> if built-in zlib decompression is available. </p></dd>
</dl> <dl> <dt id="zlib-decompress-region">Function: <strong>zlib-decompress-region</strong> <em>start end &optional allow-partial</em>
</dt> <dd><p>This function decompresses the region between <var>start</var> and <var>end</var>, using built-in zlib decompression. The region should contain data that were compressed with gzip or zlib. On success, the function replaces the contents of the region with the decompressed data. If <var>allow-partial</var> is <code>nil</code> or omitted, then on failure, the function leaves the region unchanged and returns <code>nil</code>. Otherwise, it returns the number of bytes that were not decompressed and replaces the region text by whatever data was successfully decompressed. This function can be called only in unibyte buffers. </p></dd>
</dl><div class="_attribution">
<p class="_attribution-p">
Copyright © 1990-1996, 1998-2022 Free Software Foundation, Inc. <br>Licensed under the GNU GPL license.<br>
<a href="https://www.gnu.org/software/emacs/manual/html_node/elisp/Decompression.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Decompression.html</a>
</p>
</div>
|