snappy

package
v0.0.0-...-10d000d Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2013 License: Apache-2.0, BSD-3-Clause 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