compress

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compress

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

Compress compresses data using gzip

func Decompress

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

Decompress decompresses gzip data

func IsCompressed

func IsCompressed(data []byte) bool

IsCompressed checks if data is gzip compressed

func ShouldCompress

func ShouldCompress(filename string) bool

ShouldCompress determines if a file should be compressed

func SmartCompress

func SmartCompress(data []byte, filename string) ([]byte, bool)

SmartCompress compresses if beneficial, returns original if compression doesn't help

func SmartDecompress

func SmartDecompress(data []byte) []byte

SmartDecompress decompresses if data is compressed

Types

This section is empty.

Jump to

Keyboard shortcuts

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