git_zlib_cgo

package module
v0.0.0-...-7226d8e Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2023 License: GPL-2.0 Imports: 3 Imported by: 1

README

git-zlib-go

golang "compress/zlib" does not provide fine-grained control over zlib behavior, e.g. get the size of the input data.

So create git-zlib-go which can control zlib more detailed.

Partially Use git/zlib.c as C code, Invoked via cgo.

I only did inflate part. If you need deflate, welcome to contribute.

Documentation

Index

Constants

View Source
const (
	Z_NO_FLUSH      = 0
	Z_PARTIAL_FLUSH = 1
	Z_SYNC_FLUSH    = 2
	Z_FULL_FLUSH    = 3
	Z_FINISH        = 4
	Z_BLOCK         = 5
	Z_TREES         = 6
)

Allowed flush values

View Source
const (
	Z_OK            = 0
	Z_STREAM_END    = 1
	Z_NEED_DICT     = 2
	Z_ERRNO         = -1
	Z_STREAM_ERROR  = -2
	Z_DATA_ERROR    = -3
	Z_MEM_ERROR     = -4
	Z_BUF_ERROR     = -5
	Z_VERSION_ERROR = -6
)

Return codes

Variables

This section is empty.

Functions

This section is empty.

Types

type GitZStream

type GitZStream [unsafe.Sizeof(C.git_zstream{})]C.char

func (*GitZStream) AvailIn

func (strm *GitZStream) AvailIn() int

func (*GitZStream) AvailOut

func (strm *GitZStream) AvailOut() int

func (*GitZStream) Inflate

func (strm *GitZStream) Inflate(flag int) (int, error)

func (*GitZStream) InflateEnd

func (strm *GitZStream) InflateEnd() error

func (*GitZStream) InflateInit

func (strm *GitZStream) InflateInit() error

func (*GitZStream) SetInBuf

func (strm *GitZStream) SetInBuf(buf []byte, size int)

func (*GitZStream) SetOutBuf

func (strm *GitZStream) SetOutBuf(buf []byte, size int)

func (*GitZStream) TotalIn

func (strm *GitZStream) TotalIn() int

func (*GitZStream) TotalOut

func (strm *GitZStream) TotalOut() int

Jump to

Keyboard shortcuts

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