Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Codec

type Codec struct {
	// An optional framing to apply to snappy compression.
	//
	// Default to Framed.
	Framing Framing
}

Codec is the implementation of a compress.Codec which supports creating readers and writers for kafka messages compressed with snappy.

func (*Codec) Code

func (c *Codec) Code() int8

Code implements the compress.Codec interface.

func (*Codec) Name

func (c *Codec) Name() string

Name implements the compress.Codec interface.

func (*Codec) NewReader

func (c *Codec) NewReader(r io.Reader) io.ReadCloser

NewReader implements the compress.Codec interface.

func (*Codec) NewWriter

func (c *Codec) NewWriter(w io.Writer) io.WriteCloser

NewWriter implements the compress.Codec interface.

type Framing

type Framing int

Framing is an enumeration type used to enable or disable xerial framing of snappy messages.

const (
	Framed Framing = iota
	Unframed
)