Document zlib-decompress-region
authorGlenn Morris <rgm@gnu.org>
Sun, 2 Mar 2014 03:34:36 +0000 (19:34 -0800)
committerGlenn Morris <rgm@gnu.org>
Sun, 2 Mar 2014 03:34:36 +0000 (19:34 -0800)
* doc/lispref/text.texi (Decompression): New node.

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

* etc/NEWS: Related markup.

doc/lispref/ChangeLog
doc/lispref/elisp.texi
doc/lispref/text.texi
etc/NEWS

index 4b629e6..e872724 100644 (file)
@@ -1,3 +1,8 @@
+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.
index 76b9857..a0f447f 100644 (file)
@@ -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.
index 9df6cf6..5a38ce1 100644 (file)
@@ -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
index b317d2b..1eb9a70 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -91,6 +91,7 @@ to set up the initial buffer.
 \f
 * 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.