commit | 5c78589b69c87f25a4792d9c8a1446294c07600e | [log] [tgz] |
---|---|---|
author | Joe Tsai <joetsai@digital-static.net> | Tue Sep 01 23:42:43 2015 -0700 |
committer | Nigel Tao <nigeltao@golang.org> | Thu Sep 03 01:54:35 2015 +0000 |
tree | 02f1b85aaaf9d22b5de68cb4af44ad84096c0eb5 | |
parent | 9f0baca5054c8039d763f6a4d71d4508e896d546 [diff] |
compress/flate: simplify inflate logic The flate library contains generator code, which is used to generate the fixed huffman table. This is done so that fixed blocks can be processed quicker since there is no need generate the decoder table for fixed codes. Instead, delete the precomputed table, and use sync.Once to generate it at runtime when used. Advantages: * Reduces duplicated logic in flate package * Reduces binary size by approximately 2KiB Disadvantages: * For the simplest possible program that simply decodes the fixed block "\x03\x00" once, the modified code takes 4.7% longer for the first decode. Compression performance for subsequent blocks afterwards has no noticeable slow down. Change-Id: I8f351218debf7d732118808859eda481b01011f6 Reviewed-on: https://go-review.googlesource.com/14181 Reviewed-by: Nigel Tao <nigeltao@golang.org>
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
For documentation about how to install and use Go, visit https://golang.org/ or load doc/install-source.html in your web browser.
Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.
Please report issues here: https://golang.org/issue/new
Go is the work of hundreds of contributors. We appreciate your help!
To contribute, please read the contribution guidelines: https://golang.org/doc/contribute.html
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
If you have just untarred a binary Go distribution, you need to set the environment variable $GOROOT to the full path of the go directory (the one containing this file). You can omit the variable if you unpack it into /usr/local/go, or if you rebuild from sources by running all.bash (see doc/install-source.html). You should also add the Go binary directory $GOROOT/bin to your shell's path.
For example, if you extracted the tar file into $HOME/go, you might put the following in your .profile:
export GOROOT=$HOME/go export PATH=$PATH:$GOROOT/bin
See https://golang.org/doc/install or doc/install.html for more details.