zlib

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

README

LLGo wrapper of madler/zlib

How to install

on macOS (Homebrew)
brew install zlib
on Linux (Debian/Ubuntu)
TODO

Demos

The _demo directory contains our demos (it start with _ to prevent the go command from compiling it):

How to run demos

To run the demos in directory _demo:

cd <demo-directory>  # eg. cd _demo/normal
llgo run .

Documentation

Index

Constants

View Source
const (
	OK            = 0
	STREAM_END    = 1
	NEED_DICT     = 2
	ERRNO         = -1
	STREAM_ERROR  = -2
	DATA_ERROR    = -3
	MEM_ERROR     = -4
	BUF_ERROR     = -5
	VERSION_ERROR = -6
)

errno

View Source
const (
	NO_COMPRESSION      = 0
	BEST_SPEED          = 1
	BEST_COMPRESSION    = 9
	DEFAULT_COMPRESSION = -1
)

compression levels

View Source
const (
	NO_FLUSH      = 0
	PARTIAL_FLUSH = 1
	SYNC_FLUSH    = 2
	FULL_FLUSH    = 3
	FINISH        = 4
	BLOCK         = 5
	TREES         = 6
)
View Source
const (
	FILTERED         = 1
	HUFFMAN_ONLY     = 2
	RLE              = 3
	FIXED            = 4
	DEFAULT_STRATEGY = 0
)
View Source
const (
	BINARY  = 0
	TEXT    = 1
	ASCII   = TEXT
	UNKNOWN = 2
)
View Source
const (
	DEFLATED = 8
)
View Source
const (
	LLGoPackage = "link: $(pkg-config --libs zlib); -lz"
)

Variables

This section is empty.

Functions

func Compress

func Compress(dest *byte, destLen *c.Ulong, source *byte, sourceLen c.Ulong) c.Int

func Compress2

func Compress2(dest *byte, destLen *c.Ulong, source *byte, sourceLen c.Ulong, level c.Int) c.Int

func CompressBound

func CompressBound(sourceLen c.Ulong) c.Ulong

func Uncompress

func Uncompress(dest *byte, destLen *c.Ulong, source *byte, sourceLen c.Ulong) c.Int

func Uncompress2

func Uncompress2(dest *byte, destLen *c.Ulong, source *byte, sourceLen *c.Ulong) c.Int

Types

This section is empty.

Directories

Path Synopsis
_demo

Jump to

Keyboard shortcuts

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