Documentation
¶
Index ¶
Constants ¶
View Source
const UseStandardZstdLib = true
UseStandardZstdLib indicates whether the zstd implementation is a port of the official one in the facebook/zstd repository.
This constant is only used in tests. Some tests rely on reproducibility of SST files, but a custom implementation of zstd will produce different compression result. So those tests have to be disabled in such cases.
We cannot always use the official facebook/zstd implementation since it relies on CGo.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Compressor ¶
type Compressor interface { // Compress a block, appending the compressed data to dst[:0]. Compress(dst, src []byte) []byte // Close must be called when the Compressor is no longer needed. // After Close is called, the Compressor must not be used again. Close() }
func GetCompressor ¶
func GetCompressor(a Algorithm) Compressor
type Decompressor ¶
type Decompressor interface { // DecompressInto decompresses compressed into buf. The buf slice must have the // exact size as the decompressed value. Callers may use DecompressedLen to // determine the correct size. DecompressInto(buf, compressed []byte) error // DecompressedLen returns the length of the provided block once decompressed, // allowing the caller to allocate a buffer exactly sized to the decompressed // payload. DecompressedLen(b []byte) (decompressedLen int, err error) // Close must be called when the Decompressor is no longer needed. // After Close is called, the Decompressor must not be used again. Close() }
func GetDecompressor ¶
func GetDecompressor(a Algorithm) Decompressor
Click to show internal directories.
Click to hide internal directories.