bzip2

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2019 License: BSD-3-Clause Imports: 7 Imported by: 297

Documentation

Overview

Package bzip2 implements the BZip2 compressed data format.

Canonical C implementation:

http://bzip.org

Unofficial format specification:

https://github.com/dsnet/compress/blob/master/doc/bzip2-format.pdf

Index

Constants

View Source
const (
	BestSpeed          = 1
	BestCompression    = 9
	DefaultCompression = 6
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Reader

type Reader struct {
	InputOffset  int64 // Total number of bytes read from underlying io.Reader
	OutputOffset int64 // Total number of bytes emitted from Read
	// contains filtered or unexported fields
}

func NewReader

func NewReader(r io.Reader, conf *ReaderConfig) (*Reader, error)

func (*Reader) Close

func (zr *Reader) Close() error

func (*Reader) Read

func (zr *Reader) Read(buf []byte) (int, error)

func (*Reader) Reset

func (zr *Reader) Reset(r io.Reader) error

type ReaderConfig

type ReaderConfig struct {
	// contains filtered or unexported fields
}

type Writer

type Writer struct {
	InputOffset  int64 // Total number of bytes issued to Write
	OutputOffset int64 // Total number of bytes written to underlying io.Writer
	// contains filtered or unexported fields
}

func NewWriter

func NewWriter(w io.Writer, conf *WriterConfig) (*Writer, error)

func (*Writer) Close

func (zw *Writer) Close() error

func (*Writer) Reset

func (zw *Writer) Reset(w io.Writer) error

func (*Writer) Write

func (zw *Writer) Write(buf []byte) (int, error)

type WriterConfig

type WriterConfig struct {
	Level int
	// contains filtered or unexported fields
}

Directories

Path Synopsis
internal
sais
Package sais implements a linear time suffix array algorithm.
Package sais implements a linear time suffix array algorithm.

Jump to

Keyboard shortcuts

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