snappy

package
v0.4.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 8, 2020 License: MIT Imports: 5 Imported by: 0

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
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL