commit | e7c1f5e7dbb87d8921928a6d9fc52fb31ce73b24 | [log] [tgz] |
---|---|---|
author | Nigel Tao <nigeltao@golang.org> | Wed Oct 09 01:00:51 2019 |
committer | Nigel Tao <nigeltao@golang.org> | Wed Oct 09 23:45:06 2019 |
tree | 1e41a45193e0953222fbcac8630a310a1e5e78ae | |
parent | 69e4b8554b2a817a1f0015867f0858d02801f0f5 [diff] |
ccitt: style fixes This commit applies some style fixes raised in the https://go-review.googlesource.com/c/image/+/194417 "ccitt: set bitReader default order to MSB" review. Having nextBit return uint64, not uint32, removes some type conversions. Removed a redundant "& 1" computation. Updated a comment with s/LSB/MSB/, missed in the previous commit. Restored the semantics of the "nBits" variable. Throughout the package, there are a number of times where we use paired local variables or paired struct fields, named "bits" and "nBits". The semantics is that "bits"' type is uint32 or uint64 that actually holds a variable number of bits, and "nBits" is that variable number. The previous commit, writing MSB-first instead of LSB-first, changed the semantics (without changing the variable name) so that one of those "nBits" variables now held the index of the next bit, not the number of bits. This commit restores the semantics: the shift is (7 - nBits), not just nBits. Change-Id: I9afada9becceeb5642ce2c60eaf7bc0ede0cdd12 Reviewed-on: https://go-review.googlesource.com/c/image/+/199957 Reviewed-by: Horst Rutter <hhrutter@gmail.com> Reviewed-by: Benny Siegert <bsiegert@gmail.com> Run-TryBot: Benny Siegert <bsiegert@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
This repository holds supplementary Go image libraries.
The easiest way to install is to run go get -u golang.org/x/image/...
. You can also manually git clone the repository to $GOPATH/src/golang.org/x/image
.
This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://golang.org/doc/contribute.html.
The main issue tracker for the image repository is located at https://github.com/golang/go/issues. Prefix your issue with “x/image:” in the subject line, so it is easy to find.