betterFastEncoder 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
| 38 | // When we find a short match, after checking the long, we check if we can find a long at n+1 |
| 39 | // and that it is longer (lazy matching). |
| 40 | type betterFastEncoder struct { |
| 41 | fastBase |
| 42 | table [betterShortTableSize]tableEntry |
| 43 | longTable [betterLongTableSize]prevEntry |
| 44 | } |
| 45 | |
| 46 | type betterFastEncoderDict struct { |
| 47 | betterFastEncoder |
nothing calls this directly
no outgoing calls
no test coverage detected