MCPcopy Index your code
hub / github.com/cockroachdb/pebble / Compressor

Interface Compressor

internal/compression/compression.go:75–83  ·  view source on GitHub ↗

Compressor is an interface for compressing data. An instance is associated with a specific Setting.

Source from the content-addressed store, hash-verified

73// Compressor is an interface for compressing data. An instance is associated
74// with a specific Setting.
75type Compressor interface {
76 // Compress a block, appending the compressed data to dst[:0].
77 // Returns setting used.
78 Compress(dst, src []byte) ([]byte, Setting)
79
80 // Close must be called when the Compressor is no longer needed.
81 // After Close is called, the Compressor must not be used again.
82 Close()
83}
84
85func GetCompressor(s Setting) Compressor {
86 switch s.Algorithm {

Callers 17

CompressMethod · 0.65
CompressMethod · 0.65
TestMinLZLargeBlockFunction · 0.65
TestCompressionRoundtripFunction · 0.65
BlockMethod · 0.65
runExperimentMethod · 0.65
TestCompressorFunction · 0.65
CompressAndChecksumFunction · 0.65
FreeMethod · 0.65
TestReadShardConcurrentFunction · 0.65

Implementers 6

minlzCompressorinternal/compression/minlz.go
noopCompressorinternal/compression/noop.go
zstdCompressorinternal/compression/zstd_cgo.go
AdaptiveCompressorinternal/compression/adaptive.go
snappyCompressorinternal/compression/snappy.go
Compressorsstable/block/compressor.go

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…