bestFastEncoder uses 2 tables, one for short matches (5 bytes) and one for long matches. The long match table contains the previous entry with the same hash, effectively making it a "chain" of length 2. When we find a long match we choose between the two values and select the longest. When we find a
| 67 | // When we find a short match, after checking the long, we check if we can find a long at n+1 |
| 68 | // and that it is longer (lazy matching). |
| 69 | type bestFastEncoder struct { |
| 70 | fastBase |
| 71 | table [bestShortTableSize]prevEntry |
| 72 | longTable [bestLongTableSize]prevEntry |
| 73 | dictTable []prevEntry |
| 74 | dictLongTable []prevEntry |
| 75 | } |
| 76 | |
| 77 | // Encode improves compression... |
| 78 | func (e *bestFastEncoder) Encode(blk *blockEnc, src []byte) { |
nothing calls this directly
no outgoing calls
no test coverage detected