@@ -111,14 +111,14 @@ func (e *fastEncL5) Encode(dst *tokens, src []byte) {
111
111
112
112
t = lCandidate .Cur .offset - e .cur
113
113
if s - t < maxMatchOffset {
114
- if uint32 (cv ) == load3232 (src , lCandidate . Cur . offset - e . cur ) {
114
+ if uint32 (cv ) == load3232 (src , t ) {
115
115
// Store the next match
116
116
e .table [nextHashS ] = tableEntry {offset : nextS + e .cur }
117
117
eLong := & e .bTable [nextHashL ]
118
118
eLong .Cur , eLong .Prev = tableEntry {offset : nextS + e .cur }, eLong .Cur
119
119
120
120
t2 := lCandidate .Prev .offset - e .cur
121
- if s - t2 < maxMatchOffset && uint32 (cv ) == load3232 (src , lCandidate . Prev . offset - e . cur ) {
121
+ if s - t2 < maxMatchOffset && uint32 (cv ) == load3232 (src , t2 ) {
122
122
l = e .matchlen (s + 4 , t + 4 , src ) + 4
123
123
ml1 := e .matchlen (s + 4 , t2 + 4 , src ) + 4
124
124
if ml1 > l {
@@ -130,7 +130,7 @@ func (e *fastEncL5) Encode(dst *tokens, src []byte) {
130
130
break
131
131
}
132
132
t = lCandidate .Prev .offset - e .cur
133
- if s - t < maxMatchOffset && uint32 (cv ) == load3232 (src , lCandidate . Prev . offset - e . cur ) {
133
+ if s - t < maxMatchOffset && uint32 (cv ) == load3232 (src , t ) {
134
134
// Store the next match
135
135
e .table [nextHashS ] = tableEntry {offset : nextS + e .cur }
136
136
eLong := & e .bTable [nextHashL ]
@@ -140,7 +140,7 @@ func (e *fastEncL5) Encode(dst *tokens, src []byte) {
140
140
}
141
141
142
142
t = sCandidate .offset - e .cur
143
- if s - t < maxMatchOffset && uint32 (cv ) == load3232 (src , sCandidate . offset - e . cur ) {
143
+ if s - t < maxMatchOffset && uint32 (cv ) == load3232 (src , t ) {
144
144
// Found a 4 match...
145
145
l = e .matchlen (s + 4 , t + 4 , src ) + 4
146
146
lCandidate = e .bTable [nextHashL ]
@@ -153,7 +153,7 @@ func (e *fastEncL5) Encode(dst *tokens, src []byte) {
153
153
// If the next long is a candidate, use that...
154
154
t2 := lCandidate .Cur .offset - e .cur
155
155
if nextS - t2 < maxMatchOffset {
156
- if load3232 (src , lCandidate . Cur . offset - e . cur ) == uint32 (next ) {
156
+ if load3232 (src , t2 ) == uint32 (next ) {
157
157
ml := e .matchlen (nextS + 4 , t2 + 4 , src ) + 4
158
158
if ml > l {
159
159
t = t2
@@ -164,7 +164,7 @@ func (e *fastEncL5) Encode(dst *tokens, src []byte) {
164
164
}
165
165
// If the previous long is a candidate, use that...
166
166
t2 = lCandidate .Prev .offset - e .cur
167
- if nextS - t2 < maxMatchOffset && load3232 (src , lCandidate . Prev . offset - e . cur ) == uint32 (next ) {
167
+ if nextS - t2 < maxMatchOffset && load3232 (src , t2 ) == uint32 (next ) {
168
168
ml := e .matchlen (nextS + 4 , t2 + 4 , src ) + 4
169
169
if ml > l {
170
170
t = t2
@@ -423,14 +423,14 @@ func (e *fastEncL5Window) Encode(dst *tokens, src []byte) {
423
423
424
424
t = lCandidate .Cur .offset - e .cur
425
425
if s - t < maxMatchOffset {
426
- if uint32 (cv ) == load3232 (src , lCandidate . Cur . offset - e . cur ) {
426
+ if uint32 (cv ) == load3232 (src , t ) {
427
427
// Store the next match
428
428
e .table [nextHashS ] = tableEntry {offset : nextS + e .cur }
429
429
eLong := & e .bTable [nextHashL ]
430
430
eLong .Cur , eLong .Prev = tableEntry {offset : nextS + e .cur }, eLong .Cur
431
431
432
432
t2 := lCandidate .Prev .offset - e .cur
433
- if s - t2 < maxMatchOffset && uint32 (cv ) == load3232 (src , lCandidate . Prev . offset - e . cur ) {
433
+ if s - t2 < maxMatchOffset && uint32 (cv ) == load3232 (src , t2 ) {
434
434
l = e .matchlen (s + 4 , t + 4 , src ) + 4
435
435
ml1 := e .matchlen (s + 4 , t2 + 4 , src ) + 4
436
436
if ml1 > l {
@@ -442,7 +442,7 @@ func (e *fastEncL5Window) Encode(dst *tokens, src []byte) {
442
442
break
443
443
}
444
444
t = lCandidate .Prev .offset - e .cur
445
- if s - t < maxMatchOffset && uint32 (cv ) == load3232 (src , lCandidate . Prev . offset - e . cur ) {
445
+ if s - t < maxMatchOffset && uint32 (cv ) == load3232 (src , t ) {
446
446
// Store the next match
447
447
e .table [nextHashS ] = tableEntry {offset : nextS + e .cur }
448
448
eLong := & e .bTable [nextHashL ]
@@ -452,7 +452,7 @@ func (e *fastEncL5Window) Encode(dst *tokens, src []byte) {
452
452
}
453
453
454
454
t = sCandidate .offset - e .cur
455
- if s - t < maxMatchOffset && uint32 (cv ) == load3232 (src , sCandidate . offset - e . cur ) {
455
+ if s - t < maxMatchOffset && uint32 (cv ) == load3232 (src , t ) {
456
456
// Found a 4 match...
457
457
l = e .matchlen (s + 4 , t + 4 , src ) + 4
458
458
lCandidate = e .bTable [nextHashL ]
@@ -465,7 +465,7 @@ func (e *fastEncL5Window) Encode(dst *tokens, src []byte) {
465
465
// If the next long is a candidate, use that...
466
466
t2 := lCandidate .Cur .offset - e .cur
467
467
if nextS - t2 < maxMatchOffset {
468
- if load3232 (src , lCandidate . Cur . offset - e . cur ) == uint32 (next ) {
468
+ if load3232 (src , t2 ) == uint32 (next ) {
469
469
ml := e .matchlen (nextS + 4 , t2 + 4 , src ) + 4
470
470
if ml > l {
471
471
t = t2
@@ -476,7 +476,7 @@ func (e *fastEncL5Window) Encode(dst *tokens, src []byte) {
476
476
}
477
477
// If the previous long is a candidate, use that...
478
478
t2 = lCandidate .Prev .offset - e .cur
479
- if nextS - t2 < maxMatchOffset && load3232 (src , lCandidate . Prev . offset - e . cur ) == uint32 (next ) {
479
+ if nextS - t2 < maxMatchOffset && load3232 (src , t2 ) == uint32 (next ) {
480
480
ml := e .matchlen (nextS + 4 , t2 + 4 , src ) + 4
481
481
if ml > l {
482
482
t = t2
0 commit comments