compression

package
v1.11.1 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2026 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const CompressionThreshold = 1024 // 1KB - small messages not worth compressing

CompressionThreshold defines minimum bytes before compression is applied

Variables

This section is empty.

Functions

func CompressLZMA

func CompressLZMA(data []byte) ([]byte, float64, error)

CompressLZMA compresses data using LZMA algorithm (xz format) Only compresses if data exceeds CompressionThreshold Returns compressed data and compression ratio, or original data if compression not beneficial

func DecompressLZMA

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

DecompressLZMA decompresses LZMA-compressed data (xz format)

Types

This section is empty.

Jump to

Keyboard shortcuts

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