Documentation
¶
Overview ¶
Package compression provides a set of constants describing the compression options
Index ¶
Constants ¶
const GzipEncoding = "gzip"
GzipEncoding is the content-encoding value for Gzip
const GzipKind = "gzip"
GzipKind defines a const value for the gzip compressor
const NoneKind = "none"
NoneKind defines a const value for disabling compression
const ZlibEncoding = "deflate"
ZlibEncoding is the content-encoding value for Zlib
const ZlibKind = "zlib"
ZlibKind defines a const value for the zlib compressor
const ZstdEncoding = "zstd"
ZstdEncoding is the content-encoding value for Zstd
const ZstdKind = "zstd"
ZstdKind defines a const value for the zstd compressor
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Compressor ¶ added in v0.63.0
type Compressor interface {
Compress(src []byte) ([]byte, error)
Decompress(src []byte) ([]byte, error)
CompressBound(sourceLen int) int
ContentEncoding() string
NewStreamCompressor(output *bytes.Buffer) StreamCompressor
}
Compressor is the interface that a given compression algorithm needs to implement
type StreamCompressor ¶ added in v0.63.0
type StreamCompressor interface {
io.WriteCloser
Flush() error
}
StreamCompressor is the interface that the compression algorithm should implement for streaming
type ZstdCompressionLevel ¶ added in v0.63.0
type ZstdCompressionLevel int
ZstdCompressionLevel is a wrapper type over int for the compression level for zstd compression, if that is selected.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package gzipimpl provides a set of functions for compressing with zlib / zstd / gzip
|
Package gzipimpl provides a set of functions for compressing with zlib / zstd / gzip |
|
Package noopimpl provides a set of functions for compressing with zlib / zstd
|
Package noopimpl provides a set of functions for compressing with zlib / zstd |
|
Package zlibimpl provides a set of functions for compressing with zlib
|
Package zlibimpl provides a set of functions for compressing with zlib |
|
Package zstdimpl provides a set of functions for compressing with zstd
|
Package zstdimpl provides a set of functions for compressing with zstd |
|
Package zstdimpl provides a set of functions for compressing with zstd
|
Package zstdimpl provides a set of functions for compressing with zstd |
|
Package selector provides correct compression impl to fx
|
Package selector provides correct compression impl to fx |