Skip to content

Commit 22e8c2a

Browse files
dmitshurgopherbot
authored andcommitted
_content/doc/go1.27: note flate compression speed and exact bytes
The improvement to compression speed seems notable enough to be worth mentioning. (Maybe it can be quantified succinctly enough for release notes, or otherwise we can point to the issue.) Even though the exact encoded output is not covered by the Go 1 compatibility promise, it's possible (and given enough scale, likely) that some Go code or tests to have started to incorrectly rely on it not changing since it has been a while since the last change in Go 1.8 (see https://go.dev/doc/go1.8#compressflatepkgcompressflate). Give a similar heads up, since it's something users updating to the Go 1.27 toolchain may have to take into account. For golang/go#75532. For golang/go#78779. Change-Id: I5067c42c1f318a722f6325973fa113e9cac06806 Reviewed-on: https://go-review.googlesource.com/c/website/+/791420 Reviewed-by: Michael Pratt <mpratt@google.com> Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
1 parent b162cde commit 22e8c2a

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

_content/doc/go1.27.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,16 @@ The new [`CutLast`](/pkg/bytes#CutLast) function slices a `[]byte`
358358
around the last occurrence of a separator.
359359
It can replace and simplify some common uses of [`LastIndex`](/pkg/bytes#LastIndex).
360360

361+
#### [`compress/flate`](/pkg/compress/flate/)
362+
363+
<!-- go.dev/issue/75532, CL 707355 -->
364+
365+
Compression speed is improved in Go 1.27.
366+
The exact encoded output from [`Writer`](/pkg/compress/flate#Writer) may be different from Go 1.26
367+
as a result of the encoder implementation change.
368+
Since DEFLATE is the underlying compression used in [`archive/zip`](/pkg/archive/zip), [`compress/gzip`](/pkg/compress/gzip), [`compress/zlib`](/pkg/compress/zlib), and [`image/png`](/pkg/image/png),
369+
the outputs from those packages may also have changed.
370+
361371
#### [`crypto`](/pkg/crypto/)
362372

363373
<!-- 6-stdlib/99-minor/crypto/77626.md -->

0 commit comments

Comments
 (0)