Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Compress ¶
func Compress(w io.Writer, compression CompressionType, level *int) (io.WriteCloser, error)
Compress makes a compressed writer from the given one
func Decompress ¶
func Decompress(r io.Reader, c CompressionType) (io.ReadCloser, error)
Decompress wraps given reader by the decompressing io.ReadCloser
func IsValidCompressionType ¶
Types ¶
type CompressionType ¶
type CompressionType string
const ( CompressionTypeNone CompressionType = "none" CompressionTypeGZIP CompressionType = "gzip" CompressionTypePGZIP CompressionType = "pgzip" CompressionTypeSNAPPY CompressionType = "snappy" CompressionTypeLZ4 CompressionType = "lz4" CompressionTypeS2 CompressionType = "s2" CompressionTypeZstandard CompressionType = "zstd" )
func FileCompression ¶
func FileCompression(ext string) CompressionType
FileCompression return compression alg based on given file extension
func (CompressionType) Suffix ¶
func (c CompressionType) Suffix() string
Click to show internal directories.
Click to hide internal directories.