lz

package
v0.0.0-...-4936527 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Opening   = "<"
	Closing   = ">"
	Separator = ","
)
View Source
const DefaultWindowSize = 4096
View Source
const EncodedOpening = 0xff
View Source
const EscapeByte = 0x5c
View Source
const MinimumSizeOfReference int = -1 // Use -1 to represent dynamic "smart" reference inclusion

Variables

This section is empty.

Functions

func Compress

func Compress(fileContents []byte, useProgressBar bool, maxSearchBufferLength int) []byte

func CompressFileSync

func CompressFileSync(fileContents []byte, useProgressBar bool, maxSearchBufferLength int) []byte

func CompressFileSync2

func CompressFileSync2(fileContents []byte, _ bool, maxSearchBufferLength int) []byte

func CompressorWorkerAsync

func CompressorWorkerAsync(waitgroup *sync.WaitGroup, output chan<- Reference, searchBuffer []byte, scanBytes []byte, nextBytes []byte, bar *pb.ProgressBar)

func DecodeOpeningSymbols

func DecodeOpeningSymbols(bytes []byte) []byte

func Decompress

func Decompress(fileContents []byte, useProgressBar bool) []byte

func EncodeOpeningSymbols

func EncodeOpeningSymbols(bytes []byte) []byte

func FindReverse

func FindReverse(slice []byte, val byte) (int, bool)

func FindReverseSlice

func FindReverseSlice(input []byte, val []byte) (int, bool)

func FindSequential

func FindSequential(slice []byte, val byte) (int, bool)

func NewReader

func NewReader(r io.Reader) io.Reader

func NewWriter

func NewWriter(w io.Writer) io.WriteCloser

func SortByteArray

func SortByteArray(src []byte)

Types

type Reader

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

func (*Reader) Close

func (r *Reader) Close() error

func (*Reader) Read

func (r *Reader) Read(content []byte) (n int, err error)

type Reference

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

func CompressorWorker

func CompressorWorker(searchBuffer []byte, scanBytes []byte, nextBytes []byte, bar *pb.ProgressBar) Reference

type Writer

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

func NewWriterLevel

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

func (*Writer) Close

func (writer *Writer) Close() error

func (*Writer) Write

func (writer *Writer) Write(data []byte) (n int, err error)

Jump to

Keyboard shortcuts

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