]> Cypherpunks repositories - gostls13.git/commitdiff
doc/go1.7.html: update documentation regarding compress/flate
authorJoe Tsai <joetsai@digital-static.net>
Sat, 28 May 2016 09:40:32 +0000 (02:40 -0700)
committerJoe Tsai <thebrokentoaster@gmail.com>
Sun, 29 May 2016 06:52:39 +0000 (06:52 +0000)
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>
doc/go1.7.html

index e9f30d70cde53f6833359fc27394440859211cd7..2005ef422aee59642db188008e2a12b7630b7691 100644 (file)
@@ -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>