Documentation ¶
Index ¶
- type CompressionI
- type GzipCompressor
- func (c *GzipCompressor) Compress(record []byte) ([]byte, error)
- func (c *GzipCompressor) CompressWithBuf(record []byte, destinationBuffer []byte) ([]byte, error)
- func (c *GzipCompressor) Decompress(buf []byte) ([]byte, error)
- func (c *GzipCompressor) DecompressWithBuf(buf []byte, destinationBuffer []byte) ([]byte, error)
- type SnappyCompressor
- func (c *SnappyCompressor) Compress(record []byte) ([]byte, error)
- func (c *SnappyCompressor) CompressWithBuf(record []byte, destinationBuffer []byte) ([]byte, error)
- func (c *SnappyCompressor) Decompress(buf []byte) ([]byte, error)
- func (c *SnappyCompressor) DecompressWithBuf(buf []byte, destinationBuffer []byte) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CompressionI ¶
type CompressionI interface { // compresses the given record of bytes Compress(record []byte) ([]byte, error) // decompresses the given byte buffer Decompress(buf []byte) ([]byte, error) // compresses the given record of bytes and a buffer where to compress into. // if the buffer doesn't fit, it will resize it (truncate/enlarging copy). // Thus it's important to use the returned buffer value. CompressWithBuf(record []byte, destinationBuffer []byte) ([]byte, error) // decompresses the given byte buffer and a buffer where to decompress into. // if the buffer doesn't fit, it will resize it (truncate/enlarging copy). // Thus it's important to use the returned buffer value. DecompressWithBuf(buf []byte, destinationBuffer []byte) ([]byte, error) }
type GzipCompressor ¶
type GzipCompressor struct { }
func (*GzipCompressor) CompressWithBuf ¶ added in v1.3.0
func (c *GzipCompressor) CompressWithBuf(record []byte, destinationBuffer []byte) ([]byte, error)
func (*GzipCompressor) Decompress ¶
func (c *GzipCompressor) Decompress(buf []byte) ([]byte, error)
func (*GzipCompressor) DecompressWithBuf ¶ added in v1.3.0
func (c *GzipCompressor) DecompressWithBuf(buf []byte, destinationBuffer []byte) ([]byte, error)
type SnappyCompressor ¶
type SnappyCompressor struct { }
func (*SnappyCompressor) Compress ¶
func (c *SnappyCompressor) Compress(record []byte) ([]byte, error)
func (*SnappyCompressor) CompressWithBuf ¶ added in v1.3.0
func (c *SnappyCompressor) CompressWithBuf(record []byte, destinationBuffer []byte) ([]byte, error)
func (*SnappyCompressor) Decompress ¶
func (c *SnappyCompressor) Decompress(buf []byte) ([]byte, error)
func (*SnappyCompressor) DecompressWithBuf ¶ added in v1.3.0
func (c *SnappyCompressor) DecompressWithBuf(buf []byte, destinationBuffer []byte) ([]byte, error)
Click to show internal directories.
Click to hide internal directories.