Versions in this module Expand all Collapse all v1 v1.0.1 Mar 13, 2026 v1.0.0 Mar 11, 2026 Changes in this version + func GetAlgorithmName(alg Algorithm) string + func IsAlgorithmSupported(alg Algorithm) bool + type Algorithm uint32 + const AlgorithmLz4 + const AlgorithmNone + const AlgorithmSnappy + const AlgorithmZlib + const AlgorithmZstd + func GetSupportedAlgorithms() []Algorithm + type ErrorCode int + const ErrorCodeBufferSmall + const ErrorCodeDisabled + const ErrorCodeInvalidParam + const ErrorCodeNotSupport + const ErrorCodeOk + const ErrorCodeOperation + func Compress(alg Algorithm, input []byte, level Level) ([]byte, ErrorCode) + func CompressWithRawLevel(alg Algorithm, input []byte, rawLevel int) ([]byte, ErrorCode) + func Decompress(alg Algorithm, input []byte, originalSize int) ([]byte, ErrorCode) + type Level int32 + const LevelBalanced + const LevelDefault + const LevelFast + const LevelHighRate + const LevelLowCPU + const LevelMaxRate + const LevelStorage + type MappedLevel struct + Level int + UseHighCompression bool + func MapCompressionLevel(alg Algorithm, level Level) MappedLevel