Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Codec ¶
type Codec interface { // Compress compresses given block. Compress(block []byte) ([]byte, error) // Decompress decompresses given block. Decompress(block []byte) ([]byte, error) // GetID returns codec identifier. GetID() CodecID }
Codec is a generic interface for compression/decompression.
type CodecBrotli ¶
type CodecBrotli int
func (CodecBrotli) Decompress ¶
func (c CodecBrotli) Decompress(block []byte) ([]byte, error)
func (CodecBrotli) GetID ¶
func (c CodecBrotli) GetID() CodecID
type CodecID ¶
type CodecID int8
CodecID is a type that holds all available codec types.
const ( CodecIDNone CodecID = 0 CodecIDSnappy CodecID = 1 CodecIDLz4 CodecID = 4 CodecIDLz4HighCompression CodecID = 5 CodecIDBrotli1 CodecID = 11 CodecIDBrotli2 CodecID = 12 CodecIDBrotli3 CodecID = 8 CodecIDBrotli4 CodecID = 13 CodecIDBrotli5 CodecID = 9 CodecIDBrotli6 CodecID = 14 CodecIDBrotli7 CodecID = 15 CodecIDBrotli8 CodecID = 10 CodecIDBrotli9 CodecID = 16 CodecIDBrotli10 CodecID = 17 CodecIDBrotli11 CodecID = 18 CodecIDZlib1 CodecID = 19 CodecIDZlib2 CodecID = 20 CodecIDZlib3 CodecID = 21 CodecIDZlib4 CodecID = 22 CodecIDZlib5 CodecID = 23 CodecIDZlib6 CodecID = 2 CodecIDZlib7 CodecID = 24 CodecIDZlib8 CodecID = 25 CodecIDZlib9 CodecID = 3 CodecIDZstd1 CodecID = 26 CodecIDZstd3 CodecID = 28 CodecIDZstd7 CodecID = 32 )
type CodecLz4HighCompression ¶
type CodecLz4HighCompression struct{}
func (*CodecLz4HighCompression) Compress ¶
func (c *CodecLz4HighCompression) Compress(block []byte) ([]byte, error)
func (*CodecLz4HighCompression) Decompress ¶
func (c *CodecLz4HighCompression) Decompress(block []byte) ([]byte, error)
func (*CodecLz4HighCompression) GetID ¶
func (c *CodecLz4HighCompression) GetID() CodecID
type CodecNone ¶
type CodecNone struct{}
CodecNone is a special codec that does not any compression.
func (CodecNone) Decompress ¶
Decompress returns block as is.
type CodecSnappy ¶
type CodecSnappy struct{}
func (*CodecSnappy) Decompress ¶
func (c *CodecSnappy) Decompress(block []byte) ([]byte, error)
func (*CodecSnappy) GetID ¶
func (c *CodecSnappy) GetID() CodecID
Click to show internal directories.
Click to hide internal directories.