Documentation ¶
Index ¶
Constants ¶
const ( // MaxFrameHeaderSize is the maximum frame header. MaxFrameHeaderSize = 256 // MaxDictionarySize is the maximum dictionary size. MaxDictionarySize = 256 )
Variables ¶
This section is empty.
Functions ¶
func IsFrameHeaderPreferBeCompressed ¶
IsFrameHeaderPreferBeCompressed is used to check frame header can be compressed by fast mode. If frame header is preferred be compressed, it will return the header size that be compressed. It supports IPv4/IPv6 with TCP/UDP
Types ¶
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Reader is used to decompress frame header data.
func NewReaderWithSize ¶
NewReaderWithSize is used to create a new decompressor with custom number of dictionaries.
type Searcher ¶
Searcher is used to fast search dictionaries for custom frame header. Dict is the Writer inner saved dictionaries. If cannot to search the target dictionary, return the index -1.
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
Writer is used to compress frame header data.
func NewWriterWithSize ¶
NewWriterWithSize is used to create a new compressor with custom number of dictionaries.
func (*Writer) RegisterSearcher ¶
RegisterSearcher is used to register custom searcher for fast search dictionaries with custom frame header. Size is the target frame header size.