lz4

package module
v0.0.0-...-786d3f8 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2021 License: MIT Imports: 9 Imported by: 0

README

lz4

lz4 implements reading and writing of lz4 format compressed files for Go, following lz4 stream format. It uses the lz4 C library underneath.

Installation

Download and install:

$ go get github.com/cyberdelia/lz4

Add it to your code:

import "github.com/cyberdelia/lz4"

Command line tool

Download and install:

$ go get github.com/cyberdelia/lz4/cmd/lz4

Compress and decompress:

$ lz4 testdata/pg135.txt
$ lz4 -d testdata/pg135.txt.lz4

Documentation

Index

Constants

View Source
const (
	// BestSpeed provides speed over better compression.
	BestSpeed = 3
	// BestCompression provides better compression over speed.
	BestCompression = 9
)

Variables

This section is empty.

Functions

func NewReader

func NewReader(r io.Reader) (io.ReadCloser, error)

NewReader creates a new Reader reading the given reader.

func NewWriter

func NewWriter(w io.Writer) io.WriteCloser

NewWriter creates a new Writer that satisfies writes by compressing data written to w.

func NewWriterLevel

func NewWriterLevel(w io.Writer, level int) (io.WriteCloser, error)

NewWriterLevel is like NewWriter but specifies the compression level instead of assuming the default compression level.

Types

This section is empty.

Directories

Path Synopsis
cmd
lz4

Jump to

Keyboard shortcuts

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