Documentation
¶
Overview ¶
Package zstdimpl provides a set of functions for compressing with zstd
Index ¶
- func New(reqs Requires) compression.Compressor
- type Requires
- type ZstdNoCgoStrategy
- func (s *ZstdNoCgoStrategy) Compress(src []byte) ([]byte, error)
- func (s *ZstdNoCgoStrategy) CompressBound(sourceLen int) int
- func (s *ZstdNoCgoStrategy) ContentEncoding() string
- func (s *ZstdNoCgoStrategy) Decompress(src []byte) ([]byte, error)
- func (s *ZstdNoCgoStrategy) NewStreamCompressor(output *bytes.Buffer) compression.StreamCompressor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Requires ¶
type Requires struct {
Level compression.ZstdCompressionLevel
}
Requires contains the compression level for zstd compression
type ZstdNoCgoStrategy ¶
type ZstdNoCgoStrategy struct {
// contains filtered or unexported fields
}
ZstdNoCgoStrategy can be manually selected via component - it's not used by any selector / config option
func (*ZstdNoCgoStrategy) Compress ¶
func (s *ZstdNoCgoStrategy) Compress(src []byte) ([]byte, error)
Compress will compress the data with zstd
func (*ZstdNoCgoStrategy) CompressBound ¶
func (s *ZstdNoCgoStrategy) CompressBound(sourceLen int) int
CompressBound returns the worst case size needed for a destination buffer when using zstd
func (*ZstdNoCgoStrategy) ContentEncoding ¶
func (s *ZstdNoCgoStrategy) ContentEncoding() string
ContentEncoding returns the content encoding value for zstd
func (*ZstdNoCgoStrategy) Decompress ¶
func (s *ZstdNoCgoStrategy) Decompress(src []byte) ([]byte, error)
Decompress will decompress the data with zstd
func (*ZstdNoCgoStrategy) NewStreamCompressor ¶
func (s *ZstdNoCgoStrategy) NewStreamCompressor(output *bytes.Buffer) compression.StreamCompressor
NewStreamCompressor returns a new zstd Writer
Click to show internal directories.
Click to hide internal directories.