compressor

package
v1.10.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 30, 2023 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Compressor

type Compressor struct {
	// contains filtered or unexported fields
}

Compressor is a data compressor that uses zstd.

func NewCompressor

func NewCompressor() Compressor

NewCompressor creates a new data compressor.

func (Compressor) CompressBytes

func (c Compressor) CompressBytes(src []byte) []byte

CompressBytes compresses the input via zstd.

func (Compressor) DecompressBytes

func (c Compressor) DecompressBytes(src []byte) []byte

DecompressBytes tries to decompress the input as best it can. If it detects the input to be zstd, it decompresses using that algorithm. Otherwise, it assumes the input bytes aren't compressed and returns them as-is.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL