Versions in this module Expand all Collapse all v0 v0.28.0 Apr 16, 2026 Changes in this version + var QualityNames = map[int]string + func EstimateCompressedSize(data []byte, quality int) int + func GetBuffer() *bytes.Buffer + func GetQualityName(quality int) string + func IsBrotliCompressed(data []byte) bool + func PutBuffer(buf *bytes.Buffer) + type BrotliCompressor struct + func NewBrotliCompressor() *BrotliCompressor + func NewBrotliCompressorWithConfig(cfg BrotliConfig) *BrotliCompressor + func (bc *BrotliCompressor) Compress(data []byte) ([]byte, error) + func (bc *BrotliCompressor) CompressStream(reader io.Reader, writer io.Writer) error + func (bc *BrotliCompressor) CompressWithMetadata(data []byte) (*CompressionResult, error) + func (bc *BrotliCompressor) Decompress(data []byte) ([]byte, error) + func (bc *BrotliCompressor) DecompressStream(reader io.Reader, writer io.Writer) error + type BrotliConfig struct + LGWin int + MaxSize int + MinSize int + Quality int + func DefaultBrotliConfig() BrotliConfig + type BrotliFilter struct + func NewBrotliFilter() *BrotliFilter + func NewBrotliFilterWithConfig(cfg BrotliConfig) *BrotliFilter + func (bf *BrotliFilter) Apply(input string, mode int) (string, int) + func (bf *BrotliFilter) Name() string + type CompareResult struct + Algorithms []CompressionComparison + BestRatio float64 + OriginalData []byte + Winner string + func CompareAlgorithms(data []byte) (*CompareResult, error) + func (cr *CompareResult) PrintComparison() string + type CompressionComparison struct + Algorithm string + CompressedSize int + CompressionRatio float64 + Duration time.Duration + OriginalSize int + Percentage float64 + SpaceSaved int + Speed float64 + type CompressionResult struct + Algorithm string + CompressedSize int + CompressionRatio float64 + Data []byte + OriginalSize int + SpaceSaved int + WasCompressed bool + func (cr *CompressionResult) Percentage() float64 + func (cr *CompressionResult) Summary() string