Documentation
¶
Index ¶
- Constants
- Variables
- func Compress(dst, src []byte) ([]byte, error)
- func Decompress(dst, src []byte) ([]byte, error)
- func S2Compress(dst, src []byte) ([]byte, error)
- func S2Decompress(dst, src []byte) ([]byte, error)
- func SnappyCompress(dst, src []byte) ([]byte, error)
- func SnappyDecompress(dst, src []byte) ([]byte, error)
- func ZSTDCompress(dst, src []byte, compressionLevel int) ([]byte, error)
- func ZSTDCompressBound(srcSize int) int
- func ZSTDDecompress(dst, src []byte) ([]byte, error)
Constants ¶
View Source
const ( SNAPPY = iota S2 ZSTD )
Variables ¶
View Source
var Algorithm = S2
View Source
var ZSTDCompressionLevel = 3 // 1, 3, 9
Functions ¶
func Decompress ¶
func S2Compress ¶
S2Compress compresses a block using s2 algorithm.
func S2Decompress ¶
S2Decompress decompresses a block using s2 algorithm.
func SnappyCompress ¶
SnappyCompress compresses a block using snappy algorithm.
func SnappyDecompress ¶
SnappyDecompress decompresses a block using snappy algorithm.
func ZSTDCompress ¶
ZSTDCompress compresses a block using ZSTD algorithm.
func ZSTDCompressBound ¶
ZSTDCompressBound returns the worst case size needed for a destination buffer. Klauspost ZSTD library does not provide any API for Compression Bound. This calculation is based on the DataDog ZSTD library. See https://pkg.go.dev/github.com/DataDog/zstd#CompressBound
func ZSTDDecompress ¶
ZSTDDecompress decompresses a block using ZSTD algorithm.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.