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 LzwCompressor
- func (l LzwCompressor) Compress(record []byte) ([]byte, error)
- func (l LzwCompressor) CompressWithBuf(record []byte, destinationBuffer []byte) ([]byte, error)
- func (l LzwCompressor) Decompress(buf []byte) ([]byte, error)
- func (l LzwCompressor) 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 { // Compress compresses the given record of bytes Compress(record []byte) ([]byte, error) // Decompress decompresses the given byte buffer Decompress(buf []byte) ([]byte, error) // CompressWithBuf 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) // DecompressWithBuf 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 LzwCompressor ¶ added in v1.4.0
type LzwCompressor struct { }
func (LzwCompressor) Compress ¶ added in v1.4.0
func (l LzwCompressor) Compress(record []byte) ([]byte, error)
func (LzwCompressor) CompressWithBuf ¶ added in v1.4.0
func (l LzwCompressor) CompressWithBuf(record []byte, destinationBuffer []byte) ([]byte, error)
func (LzwCompressor) Decompress ¶ added in v1.4.0
func (l LzwCompressor) Decompress(buf []byte) ([]byte, error)
func (LzwCompressor) DecompressWithBuf ¶ added in v1.4.0
func (l LzwCompressor) 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.