Documentation ¶
Overview ¶
Package racdict provides support for the RAC (Random Access Compression) common dictionary format.
See https://github.com/google/wuffs/blob/master/doc/spec/rac-spec.md#common-dictionary-format
Index ¶
Constants ¶
View Source
const ( // MaxInclLength is the maximum (inclusive) length of a dictionary, not // including the length prefix and the checksum suffix. // // Its value is (1 GiB - 1), or 1_073_741_823 bytes. MaxInclLength = (1 << 30) - 1 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Loader ¶
type Loader struct {
// contains filtered or unexported fields
}
Loader loads a dictionary wrapped in the RAC common dictionary format.
It can cache previously loaded values, keyed by a rac.Chunk.
type Saver ¶
type Saver struct {
// contains filtered or unexported fields
}
Saver saves a dictionary wrapped in the RAC common dictionary format.
func (*Saver) Compress ¶
func (w *Saver) Compress( p []byte, q []byte, resourcesData [][]byte, codec rac.Codec, compress func(p []byte, q []byte, dict []byte) ([]byte, error), refineResourceData func([]byte) []byte, ) ( retCodec rac.Codec, compressed []byte, secondaryResource int, tertiaryResource int, retErr error, )
Compress helps implement rac.CodecWriter.
Click to show internal directories.
Click to hide internal directories.