From 4969b46a316888950bd1910d7ef123883ab6c9f3 Mon Sep 17 00:00:00 2001 From: Joe Tsai Date: Sat, 28 May 2016 02:40:32 -0700 Subject: [PATCH] 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 --- doc/go1.7.html | 23 +++++++++++++++++++---- 1 file 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 -io.EOF . +io.EOF.

@@ -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 BestSpeed.

+ +

+It is important to note that both +BestSpeed and HuffmanOnly 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. +

+ +

+Lastly, there is a minor change to the decompressor's implementation of +io.Reader. In previous versions, +the decompressor deferred reporting +io.EOF until exactly no more bytes could be read. +Now, it reports +io.EOF more eagerly when reading the last set of bytes. +

crypto/tls
@@ -858,13 +873,13 @@ as req.Response. Since Go 1, the default behavior of the HTTP client is to request server-side compression using the Accept-Encoding 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 Transport's DisableCompression field. In Go 1.7, to aid the implementation of HTTP proxies, the Response's new Uncompressed field reports whether -this transparent uncompression took place. +this transparent decompression took place.

@@ -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 -io.EOF . +io.EOF.

-- 2.50.0