Documentation
¶
Overview ¶
Package gzipimpl provides a set of functions for compressing with zlib / zstd / gzip
Index ¶
- func New(req Requires) compression.Compressor
- type GzipStrategy
- func (s *GzipStrategy) Compress(src []byte) (result []byte, err error)
- func (s *GzipStrategy) CompressBound(sourceLen int) int
- func (s *GzipStrategy) ContentEncoding() string
- func (s *GzipStrategy) Decompress(src []byte) ([]byte, error)
- func (s *GzipStrategy) NewStreamCompressor(output *bytes.Buffer) compression.StreamCompressor
- type Requires
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GzipStrategy ¶
type GzipStrategy struct {
// contains filtered or unexported fields
}
GzipStrategy is the strategy for when serializer_compression_kind is gzip
func (*GzipStrategy) Compress ¶
func (s *GzipStrategy) Compress(src []byte) (result []byte, err error)
Compress will compress the data with gzip
func (*GzipStrategy) CompressBound ¶
func (s *GzipStrategy) CompressBound(sourceLen int) int
CompressBound returns the worst case size needed for a destination buffer when using gzip. Return value will be > `sourceLen`.
func (*GzipStrategy) ContentEncoding ¶
func (s *GzipStrategy) ContentEncoding() string
ContentEncoding returns the content encoding value for gzip
func (*GzipStrategy) Decompress ¶
func (s *GzipStrategy) Decompress(src []byte) ([]byte, error)
Decompress will decompress the data with gzip
func (*GzipStrategy) NewStreamCompressor ¶
func (s *GzipStrategy) NewStreamCompressor(output *bytes.Buffer) compression.StreamCompressor
NewStreamCompressor returns a new gzip Writer
Click to show internal directories.
Click to hide internal directories.