quicklz

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2020 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package quicklz implements QuickLZ compress

Translation of http://www.quicklz.com/QuickLZ.java

Licensed under the GPL, like the original.

Index

Constants

View Source
const (
	CompressBufferSize   = 528400
	DecompressBufferSize = 16
)
View Source
const (
	// Streaming mode not supported
	QLZ_STREAMING_BUFFER = 0

	// Bounds checking not supported. Use try...catch instead
	QLZ_MEMORY_SAFE = 0

	QLZ_VERSION_MAJOR    = 1
	QLZ_VERSION_MINOR    = 5
	QLZ_VERSION_REVISION = 0

	// Decrease QLZ_POINTERS_3 to increase compression speed of level 3. Do not
	// edit any other constants!
	HASH_VALUES            = 4096
	MINOFFSET              = 2
	UNCONDITIONAL_MATCHLEN = 6
	UNCOMPRESSED_END       = 4
	CWORD_LEN              = 4
	DEFAULT_HEADERLEN      = 9
	QLZ_POINTERS_1         = 1
	QLZ_POINTERS_3         = 16
)

Variables

This section is empty.

Functions

func CCompress

func CCompress(src []byte) (dst cmem.CArray, ok bool)

func CDecompress

func CDecompress(src []byte, sizeD int) (dst cmem.CArray, err error)

func CDecompressSafe

func CDecompressSafe(src []byte) (dst cmem.CArray, err error)

func Compress

func Compress(source []byte, level int) []byte

func Decompress

func Decompress(source []byte) []byte

func DecompressSafe

func DecompressSafe(src []byte) (dst []byte, err error)

func SizeCompressed

func SizeCompressed(source []byte) int

func SizeDecompressed

func SizeDecompressed(source []byte) int

Types

This section is empty.

Jump to

Keyboard shortcuts

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