Documentation
¶
Overview ¶
Package compression provides a set of functions for compressing with zlib / zstd
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NoopStrategy ¶
type NoopStrategy struct {
}
NoopStrategy is the strategy for when serializer_compressor_kind is neither zlib nor zstd
func NewNoopStrategy ¶
func NewNoopStrategy() *NoopStrategy
NewNoopStrategy returns a new NoopStrategy for when kind is neither zlib nor zstd
func (*NoopStrategy) Compress ¶
func (s *NoopStrategy) Compress(src []byte) ([]byte, error)
Compress implements the Compress method for NoopStrategy to satisfy the Compressor interface
func (*NoopStrategy) CompressBound ¶
func (s *NoopStrategy) CompressBound(sourceLen int) int
CompressBound implements the CompressBound method for NoopStrategy to satisfy the Compressor interface
func (*NoopStrategy) ContentEncoding ¶
func (s *NoopStrategy) ContentEncoding() string
ContentEncoding implements the ContentEncoding method for NoopStrategy to satisfy the Compressor interface
func (*NoopStrategy) Decompress ¶
func (s *NoopStrategy) Decompress(src []byte) ([]byte, error)
Decompress implements the Decompress method for NoopStrategy to satisfy the Compressor interface
type NoopStreamCompressor ¶
type NoopStreamCompressor struct{}
NoopStreamCompressor is the zipper for when the serializer_compressor_kind is neither zlib nor zstd
func NewNoopStreamCompressor ¶
func NewNoopStreamCompressor(_ *bytes.Buffer) NoopStreamCompressor
NewNoopStreamCompressor returns a new NoopStreamCompressor when serializer_compressor_kind is neither zlib or zstd
func (NoopStreamCompressor) Close ¶
func (s NoopStreamCompressor) Close() error
Close implements the Close method for NoopStrategy to satisfy the StreamCompressor interface
func (NoopStreamCompressor) Flush ¶
func (s NoopStreamCompressor) Flush() error
Flush implements the Flush method for NoopStrategy to satisfy the StreamCompressor interface