Source File
emitter.go
Belonging Package
github.com/andybalholm/brotli/matchfinder
package matchfinder// An absoluteMatch is like a Match, but it stores indexes into the byte// stream instead of lengths.type absoluteMatch struct {// Start is the index of the first byte.Start int// End is the index of the byte after the last byte// (so that End - Start = Length).End int// Match is the index of the previous data that matches// (Start - Match = Distance).Match int}// A matchEmitter manages the output of matches for a MatchFinder.type matchEmitter struct {// Dst is the destination slice that Matches are added to.Dst []Match// NextEmit is the index of the next byte to emit.NextEmit int}func ( *matchEmitter) ( absoluteMatch) {.Dst = append(.Dst, Match{Unmatched: .Start - .NextEmit,Length: .End - .Start,Distance: .Start - .Match,}).NextEmit = .End}
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |