]> Cypherpunks repositories - gostls13.git/commit
compress/lzw: fix comment re high-code invariant
authorNigel Tao <nigeltao@golang.org>
Fri, 23 Aug 2019 06:28:23 +0000 (16:28 +1000)
committerNigel Tao <nigeltao@golang.org>
Thu, 12 Sep 2019 07:45:53 +0000 (07:45 +0000)
commit396d62533013a39b527db4b02195e816e36dbf9a
treed52ff1572aaac3001b8dd06da91a29435b0822e0
parent3f0437e175d66a9c3d9ff1b201c4bb1b504dbfa7
compress/lzw: fix comment re high-code invariant

The listed invariant, while technically true, was misleading, and the
invariant can be tightened. We never actually get to (d.hi ==
d.overflow), due to the "d.hi--" line in the decoder.decode method.

This is a comment-only commit, changing the comment to match the code.

A follow-up commit could restore the comment, changing the code to match
the original intented invariant. But the first step is to have the
comment and the code say the same thing.

Change-Id: Ifc9f78d5060454fc107af9be298026bf3043d400
Reviewed-on: https://go-review.googlesource.com/c/go/+/191358
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/compress/lzw/reader.go