Commit d2b94b15 authored by Glenn Morris's avatar Glenn Morris

Document zlib-decompress-region

* doc/lispref/text.texi (Decompression): New node.

* doc/lispref/elisp.texi (Top): Update detailed menu.

* etc/NEWS: Related markup.
parent b6e443c5
2014-03-02 Glenn Morris <rgm@gnu.org>
* text.texi (Decompression): New node.
* elisp.texi (Top): Update detailed menu.
2014-03-01 Glenn Morris <rgm@gnu.org>
* display.texi (Forcing Redisplay): Mention pre-redisplay-function.
......
......@@ -1138,6 +1138,7 @@ Text
* Registers:: How registers are implemented. Accessing
the text or position stored in a register.
* Transposition:: Swapping two portions of a buffer.
* Decompression:: Dealing with compressed data.
* Base 64:: Conversion to or from base 64 encoding.
* Checksum/Hash:: Computing cryptographic hashes.
* Parsing HTML/XML:: Parsing HTML and XML.
......
......@@ -54,6 +54,7 @@ the character after point.
* Registers:: How registers are implemented. Accessing the text or
position stored in a register.
* Transposition:: Swapping two portions of a buffer.
* Decompression:: Dealing with compressed data.
* Base 64:: Conversion to or from base 64 encoding.
* Checksum/Hash:: Computing cryptographic hashes.
* Parsing HTML/XML:: Parsing HTML and XML.
......@@ -4132,6 +4133,35 @@ is non-@code{nil}, @code{transpose-regions} does not do this---it leaves
all markers unrelocated.
@end defun
@node Decompression
@section Dealing With Compressed Data
When @code{auto-compression-mode} is enabled, Emacs automatically
uncompresses compressed files when you visit them, and automatically
recompresses them if you alter and save them. @xref{Compressed
Files,,, emacs, The GNU Emacs Manual}.
The above feature works by calling an external executable (e.g.,
@command{gzip}). Emacs can also be compiled with support for built-in
decompression using the zlib library, which is faster than calling an
external program.
@defun zlib-available-p
This function returns non-@code{nil} if built-in zlib decompression is
available.
@end defun
@defun zlib-decompress-region start end
This function decompresses the region between @var{start} and
@var{end}, 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. On failure, the function leaves the region unchanged and
returns @code{nil}. This function can be called only in unibyte
buffers.
@end defun
@node Base 64
@section Base 64 Encoding
@cindex base 64 encoding
......
......@@ -91,6 +91,7 @@ to set up the initial buffer.
* Changes in Emacs 24.4
+++
** New function `zlib-decompress-region', which decompresses gzip- and
zlib-format compressed data using built-in zlib support, if available.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment