Run NodesReferenceutils

compression

Package compression

import "github.com/luxfi/node/utils/compression"

Types

Compressor

Compressor compress and decompresses messages. Decompress is the inverse of Compress. Decompress(Compress(msg)) == msg.

func NewGzipCompressor(maxSize int64) (Compressor, error)
func NewNoCompressor() Compressor
func NewZstdCompressor(maxSize int64) (Compressor, error)
func NewZstdCompressorWithLevel(maxSize int64, level zstd.EncoderLevel) (Compressor, error)

Type

func TypeFromString(s string) (Type, error)
func (t Type) MarshalJSON() ([]byte, error)
func (t Type) String() string