@@ -124,8 +124,8 @@ func (e *fastEncL6) Encode(dst *tokens, src []byte) {
124124 // Check the previous long candidate as well.
125125 t2 := lCandidate .Prev .offset - e .cur
126126 if s - t2 < maxMatchOffset && uint32 (cv ) == load3232 (src , t2 ) {
127- l = e .matchlen (s + 4 , t + 4 , src ) + 4
128- ml1 := e .matchlen (s + 4 , t2 + 4 , src ) + 4
127+ l = e .matchlen (int ( s + 4 ), int ( t + 4 ) , src ) + 4
128+ ml1 := e .matchlen (int ( s + 4 ), int ( t2 + 4 ) , src ) + 4
129129 if ml1 > l {
130130 t = t2
131131 l = ml1
@@ -148,7 +148,7 @@ func (e *fastEncL6) Encode(dst *tokens, src []byte) {
148148 t = sCandidate .offset - e .cur
149149 if s - t < maxMatchOffset && uint32 (cv ) == load3232 (src , t ) {
150150 // Found a 4 match...
151- l = e .matchlen (s + 4 , t + 4 , src ) + 4
151+ l = e .matchlen (int ( s + 4 ), int ( t + 4 ) , src ) + 4
152152
153153 // Look up next long candidate (at nextS)
154154 lCandidate = e .bTable [nextHashL ]
@@ -162,7 +162,7 @@ func (e *fastEncL6) Encode(dst *tokens, src []byte) {
162162 const repOff = 1
163163 t2 := s - repeat + repOff
164164 if load3232 (src , t2 ) == uint32 (cv >> (8 * repOff )) {
165- ml := e .matchlen (s + 4 + repOff , t2 + 4 , src ) + 4
165+ ml := e .matchlen (int ( s + 4 + repOff ), int ( t2 + 4 ) , src ) + 4
166166 if ml > l {
167167 t = t2
168168 l = ml
@@ -176,7 +176,7 @@ func (e *fastEncL6) Encode(dst *tokens, src []byte) {
176176 t2 = lCandidate .Cur .offset - e .cur
177177 if nextS - t2 < maxMatchOffset {
178178 if load3232 (src , t2 ) == uint32 (next ) {
179- ml := e .matchlen (nextS + 4 , t2 + 4 , src ) + 4
179+ ml := e .matchlen (int ( nextS + 4 ), int ( t2 + 4 ) , src ) + 4
180180 if ml > l {
181181 t = t2
182182 s = nextS
@@ -187,7 +187,7 @@ func (e *fastEncL6) Encode(dst *tokens, src []byte) {
187187 // If the previous long is a candidate, use that...
188188 t2 = lCandidate .Prev .offset - e .cur
189189 if nextS - t2 < maxMatchOffset && load3232 (src , t2 ) == uint32 (next ) {
190- ml := e .matchlen (nextS + 4 , t2 + 4 , src ) + 4
190+ ml := e .matchlen (int ( nextS + 4 ), int ( t2 + 4 ) , src ) + 4
191191 if ml > l {
192192 t = t2
193193 s = nextS
@@ -207,9 +207,9 @@ func (e *fastEncL6) Encode(dst *tokens, src []byte) {
207207
208208 // Extend the 4-byte match as long as possible.
209209 if l == 0 {
210- l = e .matchlenLong (s + 4 , t + 4 , src ) + 4
210+ l = e .matchlenLong (int ( s + 4 ), int ( t + 4 ) , src ) + 4
211211 } else if l == maxMatchLength {
212- l += e .matchlenLong (s + l , t + l , src )
212+ l += e .matchlenLong (int ( s + l ), int ( t + l ) , src )
213213 }
214214
215215 // Try to locate a better match by checking the end-of-match...
@@ -227,7 +227,7 @@ func (e *fastEncL6) Encode(dst *tokens, src []byte) {
227227 off := s2 - t2
228228 if off < maxMatchOffset {
229229 if off > 0 && t2 >= 0 {
230- if l2 := e .matchlenLong (s2 , t2 , src ); l2 > l {
230+ if l2 := e .matchlenLong (int ( s2 ), int ( t2 ) , src ); l2 > l {
231231 t = t2
232232 l = l2
233233 s = s2
@@ -237,7 +237,7 @@ func (e *fastEncL6) Encode(dst *tokens, src []byte) {
237237 t2 = eLong .Prev .offset - e .cur - l + skipBeginning
238238 off := s2 - t2
239239 if off > 0 && off < maxMatchOffset && t2 >= 0 {
240- if l2 := e .matchlenLong (s2 , t2 , src ); l2 > l {
240+ if l2 := e .matchlenLong (int ( s2 ), int ( t2 ) , src ); l2 > l {
241241 t = t2
242242 l = l2
243243 s = s2
0 commit comments