diff options
author | Noam Postavsky <npostavs@users.sourceforge.net> | 2018-10-27 17:45:00 -0400 |
---|---|---|
committer | Noam Postavsky <npostavs@users.sourceforge.net> | 2019-04-02 22:02:32 -0400 |
commit | b36913d803ee22a314f2e0a27523fbadeb60dd2c (patch) | |
tree | b5f8fa4e531198d1c049c42b1b0853a5dd87d72d /doc | |
parent | 2bd3e484041b2b7ea47c236b86f59610d971b609 (diff) | |
download | emacs-b36913d803ee22a314f2e0a27523fbadeb60dd2c.tar.gz |
Allow partial decompression (Bug#33133)
* src/decompress.c (Fzlib_decompress_region): Add optional
ALLOW-PARTIAL parameter.
* lisp/url/url-http.el (url-handle-content-transfer-encoding): Use it.
* doc/lispref/text.texi (Decompression): Document it.
* etc/NEWS: Announce it.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/lispref/text.texi | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index b430adf5976..86f9fa0e5f5 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi @@ -4513,14 +4513,17 @@ This function returns non-@code{nil} if built-in zlib decompression is available. @end defun -@defun zlib-decompress-region start end +@defun zlib-decompress-region start end &optional allow-partial 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. +data. If @var{allow-partial} is @code{nil} or omitted, then on +failure, the function leaves the region unchanged and returns +@code{nil}. 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. @end defun |