diff options
author | Joe Tsai <joetsai@digital-static.net> | 2016-05-28 02:40:32 -0700 |
---|---|---|
committer | Joe Tsai <thebrokentoaster@gmail.com> | 2016-05-29 06:52:39 +0000 |
commit | 4969b46a316888950bd1910d7ef123883ab6c9f3 (patch) | |
tree | a906e59f8dc83e2f01c74fe1f6a0b29d52ca6845 | |
parent | 24996832c68b9d0aa4cd0e51189d148aae7a2772 (diff) | |
download | go-4969b46a316888950bd1910d7ef123883ab6c9f3.tar.gz go-4969b46a316888950bd1910d7ef123883ab6c9f3.zip |
doc/go1.7.html: update documentation regarding compress/flate
Document the following:
* That the algorithmic changes are still compliant with RFC 1951. I remember
people having questions regarding this issue, and it would be good to re-assure
them that it is still standards compliant.
* io.EOF can now be returned early (c27efce66bce7534dbb357ac1779bbc08395b267)
* Use the term "decompress" when referred to as an action. The term "uncompressed"
or "decompressed" are both valid as ways to represent the current state of the data.
Change-Id: Ie29ebce709357359e7c36d3e7f3d53b260eaadfa
Reviewed-on: https://go-review.googlesource.com/23552
Reviewed-by: Andrew Gerrand <adg@golang.org>
-rw-r--r-- | doc/go1.7.html | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/doc/go1.7.html b/doc/go1.7.html index e9f30d70cd..2005ef422a 100644 --- a/doc/go1.7.html +++ b/doc/go1.7.html @@ -493,7 +493,7 @@ In previous releases of Go, if were asked for zero bytes with no data remaining, it would return a count of 0 and no error. Now it returns a count of 0 and the error -<a href="/pkg/io/#EOF"><code>io.EOF</code></a> . +<a href="/pkg/io/#EOF"><code>io.EOF</code></a>. </p> <p> @@ -532,6 +532,21 @@ that applies Huffman but not Lempel-Ziv encoding. but at the cost of producing compressed outputs that are 20-40% larger than those generated by the new <code>BestSpeed</code>. </p> + +<p> +It is important to note that both +<code>BestSpeed</code> and <code>HuffmanOnly</code> produce a compressed output that is RFC 1951 compliant. +In other words, any valid DEFLATE decompressor will continue to be able to decompress these outputs. +</p> + +<p> +Lastly, there is a minor change to the decompressor's implementation of +<a href="/pkg/io/#Reader"><code>io.Reader</code></a>. In previous versions, +the decompressor deferred reporting +<a href="/pkg/io/#EOF"><code>io.EOF</code></a> until exactly no more bytes could be read. +Now, it reports +<a href="/pkg/io/#EOF"><code>io.EOF</code></a> more eagerly when reading the last set of bytes. +</p> </dd> <dl id="crypto/tls"><a href="/pkg/crypto/tls/">crypto/tls</a></dl> @@ -858,13 +873,13 @@ as <code>req.Response</code>. Since Go 1, the default behavior of the HTTP client is to request server-side compression using the <code>Accept-Encoding</code> request header -and then to uncompress the response body transparently, +and then to decompress the response body transparently, and this behavior is adjustable using the <a href="/pkg/net/http/#Transport"><code>Transport</code></a>'s <code>DisableCompression</code> field. In Go 1.7, to aid the implementation of HTTP proxies, the <a href="/pkg/net/http/#Response"><code>Response</code></a>'s new <code>Uncompressed</code> field reports whether -this transparent uncompression took place. +this transparent decompression took place. </p> <p> @@ -1090,7 +1105,7 @@ In previous releases of Go, if were asked for zero bytes with no data remaining, it would return a count of 0 and no error. Now it returns a count of 0 and the error -<a href="/pkg/io/#EOF"><code>io.EOF</code></a> . +<a href="/pkg/io/#EOF"><code>io.EOF</code></a>. </p> <p> |