compress

package
v0.0.0-...-61344ea Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compress

func Compress(data []byte) ([]byte, bool, error)

Compress auto select compress strategy based on data length return compressed data, whether compression is performed, error info

func Decompress

func Decompress(data []byte) ([]byte, error)

Decompress decompress data

func Init

func Init(weak, strong int)

Init init compress params weak: weak compress threshold, compress when data length is greater than this value strong: strong compress threshold, use higher compression rate when data length is greater than this value

Types

This section is empty.

Jump to

Keyboard shortcuts

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