MCPcopy
hub / github.com/klauspost/compress / betterFastEncoder

Struct betterFastEncoder

zstd/enc_better.go:40–44  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

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).
40type betterFastEncoder struct {
41 fastBase
42 table [betterShortTableSize]tableEntry
43 longTable [betterLongTableSize]prevEntry
44}
45
46type betterFastEncoderDict struct {
47 betterFastEncoder

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected