snappy

package
v0.9.0-beta4 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2014 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package snappy implements the snappy block-based compression format. It aims for very high speeds and reasonable compression.

The C++ snappy implementation is at http://code.google.com/p/snappy/

Index

Constants

This section is empty.

Variables

View Source
var ErrCorrupt = errors.New("snappy: corrupt input")

ErrCorrupt reports that the input is invalid.

Functions

func Decode

func Decode(dst, src []byte) ([]byte, error)

Decode returns the decoded form of src. The returned slice may be a sub- slice of dst if dst was large enough to hold the entire decoded block. Otherwise, a newly allocated slice will be returned. It is valid to pass a nil dst.

func DecodedLen

func DecodedLen(src []byte) (int, error)

DecodedLen returns the length of the decoded block.

func Encode

func Encode(dst, src []byte) ([]byte, error)

Encode returns the encoded form of src. The returned slice may be a sub- slice of dst if dst was large enough to hold the entire encoded block. Otherwise, a newly allocated slice will be returned. It is valid to pass a nil dst.

func MaxEncodedLen

func MaxEncodedLen(srcLen int) int

MaxEncodedLen returns the maximum length of a snappy block, given its uncompressed length.

Types

This section is empty.

Jump to

Keyboard shortcuts

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