Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateWrapper ¶
Creates a Wrapper, capable of wrapping byte arrays. A zstandard compression dictionary will be constructed from the first sourceDataSize bytes of input; prior to this, data will be stored internally, uncompressed. The dictionary's size when built will be dictionarySize bytes.
func RestoreWrapper ¶
Recreate a Wrapper from a backup.
Types ¶
type Stats ¶
type Wrapped ¶
type Wrapped struct {
// contains filtered or unexported fields
}
func (*Wrapped) IsCompressed ¶
Returns whether the wrapped data is compressed.
type Wrapper ¶
type Wrapper interface {
Unwrap(*Wrapped) []byte
Wrap([]byte) *Wrapped
PeriodicStatsCollector(prefix string, stats *statsd.Client, period time.Duration, tags ...statsd.Tag)
GetStats() Stats
Backup(io.Writer) error
Release()
}
A Wrapper manages the wrapping and unwrapping of []byte objects, transparently handling the creation and application of a compression dictionary which is shared between subsequent Wrap operations. This is safe for use by multiple goroutines.
Click to show internal directories.
Click to hide internal directories.