snappy

package
v0.0.0-...-5299186 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2023 License: MIT Imports: 7 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

	// Compression level.
	Compression Compression
}

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 Compression

type Compression int

Compression level.

const (
	DefaultCompression Compression = iota
	FasterCompression
	BetterCompression
	BestCompression
)

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
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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