1
0
mirror of https://github.com/golang/go synced 2024-11-17 07:54:41 -07:00

Adjust comment as per CR

Change-Id: I1fa2dbc38b49b263788e666339a748761fe294f4
This commit is contained in:
Klaus Post 2020-10-17 17:18:08 +02:00
parent 56c7485425
commit 50fabab0da
No known key found for this signature in database
GPG Key ID: BAA2096BE0B8A075

View File

@ -297,7 +297,10 @@ func (e *deflateFast) shiftOffsets() {
for i := range e.table[:] {
v := e.table[i].offset - e.cur + maxMatchOffset + 1
if v < 0 {
// Indicate that this table entry is invalid.
// We want to reset e.cur to maxMatchOffset + 1, so we need to shift
// all table entries down by (e.cur - (maxMatchOffset + 1)).
// Because we ignore matches > maxMatchOffset, we can cap
// any negative offsets at 0.
v = 0
}
e.table[i].offset = v