libz

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 6, 2026 License: BSD-3-Clause Imports: 3 Imported by: 0

README

libz

Package libz is a ccgo4 version the zlib general purpose data compression library.

Based on modernc.org/sqlite by CZ.NIC z.s.p.o.

Documentation

Overview

Package libz is a ccgo4 version of the zlib general purpose data compression library.

Index

Constants

This section is empty.

Variables

View Source
var Xdeflate_copyright = [68]int8{' ', 'd', 'e', 'f', 'l', 'a', 't', 'e', ' ', '1', '.', '3', '.', '2', ' ', 'C', 'o', 'p', 'y', 'r', 'i', 'g', 'h', 't', ' ', '1', '9', '9', '5', '-', '2', '0', '2', '6', ' ', 'J', 'e', 'a', 'n', '-', 'l', 'o', 'u', 'p', ' ', 'G', 'a', 'i', 'l', 'l', 'y', ' ', 'a', 'n', 'd', ' ', 'M', 'a', 'r', 'k', ' ', 'A', 'd', 'l', 'e', 'r', ' '}
View Source
var Xinflate_copyright = [47]int8{' ', 'i', 'n', 'f', 'l', 'a', 't', 'e', ' ', '1', '.', '3', '.', '2', ' ', 'C', 'o', 'p', 'y', 'r', 'i', 'g', 'h', 't', ' ', '1', '9', '9', '5', '-', '2', '0', '2', '6', ' ', 'M', 'a', 'r', 'k', ' ', 'A', 'd', 'l', 'e', 'r', ' '}
View Source
var Xz_errmsg = [10]uintptr{
	0: __ccgo_ts + 467,
	1: __ccgo_ts + 483,
	2: __ccgo_ts + 494,
	3: __ccgo_ts + 495,
	4: __ccgo_ts + 506,
	5: __ccgo_ts + 519,
	6: __ccgo_ts + 530,
	7: __ccgo_ts + 550,
	8: __ccgo_ts + 563,
	9: __ccgo_ts + 494,
}

Functions

func Xcompress

func Xcompress(tls *libc.TLS, dest uintptr, destLen uintptr, source uintptr, sourceLen TuLong) (r int32)

func Xcompress2

func Xcompress2(tls *libc.TLS, dest uintptr, destLen uintptr, source uintptr, sourceLen TuLong, level int32) (r int32)

func Xcompress2_z

func Xcompress2_z(tls *libc.TLS, dest uintptr, destLen uintptr, source uintptr, sourceLen Tz_size_t, level int32) (r int32)

C documentation

/* ===========================================================================
     Compresses the source buffer into the destination buffer. The level
   parameter has the same meaning as in deflateInit.  sourceLen is the byte
   length of the source buffer. Upon entry, destLen is the total size of the
   destination buffer, which must be at least 0.1% larger than sourceLen plus
   12 bytes. Upon exit, destLen is the actual size of the compressed buffer.

     compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
   memory, Z_BUF_ERROR if there was not enough room in the output buffer,
   Z_STREAM_ERROR if the level parameter is invalid.

     The _z versions of the functions take size_t length arguments.
*/

func Xcompress_z

func Xcompress_z(tls *libc.TLS, dest uintptr, destLen uintptr, source uintptr, sourceLen Tz_size_t) (r int32)

C documentation

/* ===========================================================================
 */

func Xdeflate

func Xdeflate(tls *libc.TLS, strm Tz_streamp, flush int32) (r int32)

C documentation

/* ========================================================================= */

func XdeflateCopy

func XdeflateCopy(tls *libc.TLS, dest Tz_streamp, source Tz_streamp) (r int32)

C documentation

/* =========================================================================
 * Copy the source state to the destination state.
 * To simplify the source, this is not supported for 16-bit MSDOS (which
 * doesn't have enough memory anyway to duplicate compression states).
 */

func XdeflateEnd

func XdeflateEnd(tls *libc.TLS, strm Tz_streamp) (r int32)

C documentation

/* ========================================================================= */

func XdeflateGetDictionary

func XdeflateGetDictionary(tls *libc.TLS, strm Tz_streamp, dictionary uintptr, dictLength uintptr) (r int32)

C documentation

/* ========================================================================= */

func XdeflateInit2_

func XdeflateInit2_(tls *libc.TLS, strm Tz_streamp, level int32, method int32, windowBits int32, memLevel int32, strategy int32, version uintptr, stream_size int32) (r int32)

C documentation

/* ========================================================================= */

func XdeflateInit_

func XdeflateInit_(tls *libc.TLS, strm Tz_streamp, level int32, version uintptr, stream_size int32) (r int32)

C documentation

/* ========================================================================= */

func XdeflateParams

func XdeflateParams(tls *libc.TLS, strm Tz_streamp, level int32, strategy int32) (r int32)

C documentation

/* ========================================================================= */

func XdeflatePending

func XdeflatePending(tls *libc.TLS, strm Tz_streamp, pending uintptr, bits uintptr) (r int32)

C documentation

/* ========================================================================= */

func XdeflatePrime

func XdeflatePrime(tls *libc.TLS, strm Tz_streamp, bits int32, value int32) (r int32)

C documentation

/* ========================================================================= */

func XdeflateReset

func XdeflateReset(tls *libc.TLS, strm Tz_streamp) (r int32)

C documentation

/* ========================================================================= */

func XdeflateResetKeep

func XdeflateResetKeep(tls *libc.TLS, strm Tz_streamp) (r int32)

C documentation

/* ========================================================================= */

func XdeflateSetDictionary

func XdeflateSetDictionary(tls *libc.TLS, strm Tz_streamp, dictionary uintptr, dictLength TuInt) (r int32)

C documentation

/* ========================================================================= */

func XdeflateSetHeader

func XdeflateSetHeader(tls *libc.TLS, strm Tz_streamp, head Tgz_headerp) (r int32)

C documentation

/* ========================================================================= */

func XdeflateTune

func XdeflateTune(tls *libc.TLS, strm Tz_streamp, good_length int32, max_lazy int32, nice_length int32, max_chain int32) (r int32)

C documentation

/* ========================================================================= */

func XdeflateUsed

func XdeflateUsed(tls *libc.TLS, strm Tz_streamp, bits uintptr) (r int32)

C documentation

/* ========================================================================= */

func Xget_crc_table

func Xget_crc_table(tls *libc.TLS) (r uintptr)

C documentation

/* =========================================================================
 * This function can be used by asm versions of crc32(), and to force the
 * generation of the CRC tables in a threaded application.
 */

func Xgz_error

func Xgz_error(tls *libc.TLS, state Tgz_statep, err int32, msg uintptr)

C documentation

/* Create an error message in allocated memory and set state->err and
   state->msg accordingly.  Free any previous error message already there.  Do
   not try to free or allocate space if the error is Z_MEM_ERROR (out of
   memory).  Simply save the error message as a static string.  If there is an
   allocation failure constructing the error message, then convert the error to
   out of memory. */

func Xgz_intmax

func Xgz_intmax(tls *libc.TLS) (r uint32)

C documentation

/* portably return maximum value for an int (when limits.h presumed not
   available) -- we need to do this to cover cases where 2's complement not
   used, since C standard permits 1's complement and sign-bit representations,
   otherwise we could just use ((unsigned)-1) >> 1 */

func Xgzbuffer

func Xgzbuffer(tls *libc.TLS, file TgzFile, size uint32) (r int32)

C documentation

/* -- see zlib.h -- */

func Xgzclearerr

func Xgzclearerr(tls *libc.TLS, file TgzFile)

C documentation

/* -- see zlib.h -- */

func Xgzclose

func Xgzclose(tls *libc.TLS, file TgzFile) (r int32)

C documentation

/* gzclose() is in a separate file so that it is linked in only if it is used.
   That way the other gzclose functions can be used instead to avoid linking in
   unneeded compression or decompression routines. */

func Xgzclose_r

func Xgzclose_r(tls *libc.TLS, file TgzFile) (r int32)

C documentation

/* -- see zlib.h -- */

func Xgzclose_w

func Xgzclose_w(tls *libc.TLS, file TgzFile) (r int32)

C documentation

/* -- see zlib.h -- */

func Xgzdirect

func Xgzdirect(tls *libc.TLS, file TgzFile) (r int32)

C documentation

/* -- see zlib.h -- */

func Xgzeof

func Xgzeof(tls *libc.TLS, file TgzFile) (r int32)

C documentation

/* -- see zlib.h -- */

func Xgzerror

func Xgzerror(tls *libc.TLS, file TgzFile, errnum uintptr) (r uintptr)

C documentation

/* -- see zlib.h -- */

func Xgzflush

func Xgzflush(tls *libc.TLS, file TgzFile, flush int32) (r int32)

C documentation

/* -- see zlib.h -- */

func Xgzgetc

func Xgzgetc(tls *libc.TLS, file TgzFile) (r int32)

C documentation

/* -- see zlib.h -- */

func Xgzgetc_

func Xgzgetc_(tls *libc.TLS, file TgzFile) (r int32)

func Xgzgets

func Xgzgets(tls *libc.TLS, file TgzFile, buf uintptr, len1 int32) (r uintptr)

C documentation

/* -- see zlib.h -- */

func Xgzprintf

func Xgzprintf(tls *libc.TLS, file TgzFile, format uintptr, va1 uintptr) (r int32)

func Xgzputc

func Xgzputc(tls *libc.TLS, file TgzFile, c int32) (r int32)

C documentation

/* -- see zlib.h -- */

func Xgzputs

func Xgzputs(tls *libc.TLS, file TgzFile, s uintptr) (r int32)

C documentation

/* -- see zlib.h -- */

func Xgzread

func Xgzread(tls *libc.TLS, file TgzFile, buf Tvoidp, len1 uint32) (r int32)

C documentation

/* -- see zlib.h -- */

func Xgzrewind

func Xgzrewind(tls *libc.TLS, file TgzFile) (r int32)

C documentation

/* -- see zlib.h -- */

func Xgzsetparams

func Xgzsetparams(tls *libc.TLS, file TgzFile, level int32, strategy int32) (r int32)

C documentation

/* -- see zlib.h -- */

func Xgzungetc

func Xgzungetc(tls *libc.TLS, c int32, file TgzFile) (r int32)

C documentation

/* -- see zlib.h -- */

func Xgzvprintf

func Xgzvprintf(tls *libc.TLS, file TgzFile, format uintptr, va Tva_list) (r int32)

C documentation

/* -- see zlib.h -- */

func Xgzwrite

func Xgzwrite(tls *libc.TLS, file TgzFile, buf Tvoidpc, len1 uint32) (r int32)

C documentation

/* -- see zlib.h -- */

func Xinflate

func Xinflate(tls *libc.TLS, strm Tz_streamp, flush int32) (r int32)

func XinflateBack

func XinflateBack(tls *libc.TLS, strm Tz_streamp, __ccgo_fp_in Tin_func, in_desc uintptr, __ccgo_fp_out Tout_func, out_desc uintptr) (r int32)

C documentation

/*
   strm provides the memory allocation functions and window buffer on input,
   and provides information on the unused input on return.  For Z_DATA_ERROR
   returns, strm will also provide an error message.

   in() and out() are the call-back input and output functions.  When
   inflateBack() needs more input, it calls in().  When inflateBack() has
   filled the window with output, or when it completes with data in the
   window, it calls out() to write out the data.  The application must not
   change the provided input until in() is called again or inflateBack()
   returns.  The application must not change the window/output buffer until
   inflateBack() returns.

   in() and out() are called with a descriptor parameter provided in the
   inflateBack() call.  This parameter can be a structure that provides the
   information required to do the read or write, as well as accumulated
   information on the input and output such as totals and check values.

   in() should return zero on failure.  out() should return non-zero on
   failure.  If either in() or out() fails, than inflateBack() returns a
   Z_BUF_ERROR.  strm->next_in can be checked for Z_NULL to see whether it
   was in() or out() that caused in the error.  Otherwise,  inflateBack()
   returns Z_STREAM_END on success, Z_DATA_ERROR for an deflate format
   error, or Z_MEM_ERROR if it could not allocate memory for the state.
   inflateBack() can also return Z_STREAM_ERROR if the input parameters
   are not correct, i.e. strm is Z_NULL or the state was not initialized.
 */

func XinflateBackEnd

func XinflateBackEnd(tls *libc.TLS, strm Tz_streamp) (r int32)

func XinflateBackInit_

func XinflateBackInit_(tls *libc.TLS, strm Tz_streamp, windowBits int32, window uintptr, version uintptr, stream_size int32) (r int32)

C documentation

/*
   strm provides memory allocation functions in zalloc and zfree, or
   Z_NULL to use the library memory allocation functions.

   windowBits is in the range 8..15, and window is a user-supplied
   window and output buffer that is 2**windowBits bytes.
 */

func XinflateCodesUsed

func XinflateCodesUsed(tls *libc.TLS, strm Tz_streamp) (r uint64)

func XinflateCopy

func XinflateCopy(tls *libc.TLS, dest Tz_streamp, source Tz_streamp) (r int32)

func XinflateEnd

func XinflateEnd(tls *libc.TLS, strm Tz_streamp) (r int32)

func XinflateGetDictionary

func XinflateGetDictionary(tls *libc.TLS, strm Tz_streamp, dictionary uintptr, dictLength uintptr) (r int32)

func XinflateGetHeader

func XinflateGetHeader(tls *libc.TLS, strm Tz_streamp, head Tgz_headerp) (r int32)

func XinflateInit2_

func XinflateInit2_(tls *libc.TLS, strm Tz_streamp, windowBits int32, version uintptr, stream_size int32) (r int32)

func XinflateInit_

func XinflateInit_(tls *libc.TLS, strm Tz_streamp, version uintptr, stream_size int32) (r int32)

func XinflateMark

func XinflateMark(tls *libc.TLS, strm Tz_streamp) (r int64)

func XinflatePrime

func XinflatePrime(tls *libc.TLS, strm Tz_streamp, bits int32, value int32) (r int32)

func XinflateReset

func XinflateReset(tls *libc.TLS, strm Tz_streamp) (r int32)

func XinflateReset2

func XinflateReset2(tls *libc.TLS, strm Tz_streamp, windowBits int32) (r int32)

func XinflateResetKeep

func XinflateResetKeep(tls *libc.TLS, strm Tz_streamp) (r int32)

func XinflateSetDictionary

func XinflateSetDictionary(tls *libc.TLS, strm Tz_streamp, dictionary uintptr, dictLength TuInt) (r int32)

func XinflateSync

func XinflateSync(tls *libc.TLS, strm Tz_streamp) (r int32)

func XinflateSyncPoint

func XinflateSyncPoint(tls *libc.TLS, strm Tz_streamp) (r int32)

C documentation

/*
   Returns true if inflate is currently at the end of a block generated by
   Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP
   implementation to provide an additional safety check. PPP uses
   Z_SYNC_FLUSH but removes the length bytes of the resulting empty stored
   block. When decompressing, PPP checks that at the end of input packet,
   inflate is waiting for these length bytes.
 */

func XinflateUndermine

func XinflateUndermine(tls *libc.TLS, strm Tz_streamp, subvert int32) (r int32)

func XinflateValidate

func XinflateValidate(tls *libc.TLS, strm Tz_streamp, check int32) (r int32)

func Xinflate_fast

func Xinflate_fast(tls *libc.TLS, strm Tz_streamp, start uint32)

C documentation

/*
   Decode literal, length, and distance codes and write out the resulting
   literal and match bytes until either not enough input or output is
   available, an end-of-block is encountered, or a data error is encountered.
   When large enough input and output buffers are supplied to inflate(), for
   example, a 16K input buffer and a 64K output buffer, more than 95% of the
   inflate execution time is spent in this routine.

   Entry assumptions:

        state->mode == LEN
        strm->avail_in >= 6
        strm->avail_out >= 258
        start >= strm->avail_out
        state->bits < 8

   On return, state->mode is one of:

        LEN -- ran out of enough output space or enough available input
        TYPE -- reached end of block code, inflate() to interpret next block
        BAD -- error in block data

   Notes:

    - The maximum input bits used by a length/distance pair is 15 bits for the
      length code, 5 bits for the length extra, 15 bits for the distance code,
      and 13 bits for the distance extra.  This totals 48 bits, or six bytes.
      Therefore if strm->avail_in >= 6, then there is enough input to avoid
      checking for available input while decoding.

    - The maximum bytes that a single length/distance pair can output is 258
      bytes, which is the maximum length that can be coded.  inflate_fast()
      requires strm->avail_out >= 258 for each loop to avoid checking for
      output space.
 */

func Xinflate_fixed

func Xinflate_fixed(tls *libc.TLS, state uintptr)

C documentation

/*
   Return state with length and distance decoding tables and index sizes set to
   fixed code decoding.  Normally this returns fixed tables from inffixed.h.
   If BUILDFIXED is defined, then instead this routine builds the tables the
   first time it's called, and returns those tables the first time and
   thereafter.  This reduces the size of the code by about 2K bytes, in
   exchange for a little execution time.  However, BUILDFIXED should not be
   used for threaded applications if atomics are not available, as it will
   not be thread-safe.
 */

func Xinflate_table

func Xinflate_table(tls *libc.TLS, type1 Tcodetype, lens uintptr, codes uint32, table uintptr, bits uintptr, work uintptr) (r int32)

C documentation

/*
   Build a set of tables to decode the provided canonical Huffman code.
   The code lengths are lens[0..codes-1].  The result starts at *table,
   whose indices are 0..2^bits-1.  work is a writable array of at least
   lens shorts, which is used as a work area.  type is the type of code
   to be generated, CODES, LENS, or DISTS.  On return, zero is success,
   -1 is an invalid code, and +1 means that ENOUGH isn't enough.  table
   on return points to the next available entry's address.  bits is the
   requested root table index bits, and on return it is the actual root
   table index bits.  It will differ if the request is greater than the
   longest code or if it is less than the shortest code.
 */

func Xuncompress

func Xuncompress(tls *libc.TLS, dest uintptr, destLen uintptr, source uintptr, sourceLen TuLong) (r int32)

func Xuncompress2

func Xuncompress2(tls *libc.TLS, dest uintptr, destLen uintptr, source uintptr, sourceLen uintptr) (r int32)

func Xuncompress2_z

func Xuncompress2_z(tls *libc.TLS, dest uintptr, destLen uintptr, source uintptr, sourceLen uintptr) (r int32)

C documentation

/* ===========================================================================
     Decompresses the source buffer into the destination buffer.  *sourceLen is
   the byte length of the source buffer. Upon entry, *destLen is the total size
   of the destination buffer, which must be large enough to hold the entire
   uncompressed data. (The size of the uncompressed data must have been saved
   previously by the compressor and transmitted to the decompressor by some
   mechanism outside the scope of this compression library.) Upon exit,
   *destLen is the size of the decompressed data and *sourceLen is the number
   of source bytes consumed. Upon return, source + *sourceLen points to the
   first unused input byte.

     uncompress returns Z_OK if success, Z_MEM_ERROR if there was not enough
   memory, Z_BUF_ERROR if there was not enough room in the output buffer, or
   Z_DATA_ERROR if the input data was corrupted, including if the input data is
   an incomplete zlib stream.

     The _z versions of the functions take size_t length arguments.
*/

func Xuncompress_z

func Xuncompress_z(tls *libc.TLS, dest uintptr, destLen uintptr, source uintptr, sourceLen Tz_size_t) (r int32)

func XzError

func XzError(tls *libc.TLS, err int32) (r uintptr)

C documentation

/* exported to allow conversion of error code to string for compress() and
 * uncompress()
 */

func Xzcfree

func Xzcfree(tls *libc.TLS, opaque Tvoidpf, ptr Tvoidpf)

func XzlibVersion

func XzlibVersion(tls *libc.TLS) (r uintptr)

Types

type TByte

type TByte = uint8

type TBytef

type TBytef = uint8

type TIPos

type TIPos = uint32

type TPos

type TPos = uint16

type TPosf

type TPosf = uint16

type T_G_fpos64_t

type T_G_fpos64_t = Tfpos_t
type T_IO_cookie_io_functions_t = Tcookie_io_functions_t

type Talloc_func

type Talloc_func = uintptr

type Tblkcnt_t

type Tblkcnt_t = int64

type Tblksize_t

type Tblksize_t = int64

type Tblock_state

type Tblock_state = int32

type Tcaddr_t

type Tcaddr_t = uintptr

type Tcharf

type Tcharf = int8

type Tclock_t

type Tclock_t = int64

type Tclockid_t

type Tclockid_t = int32

type Tcode

type Tcode = struct {
	Fop   uint8
	Fbits uint8
	Fval  uint16
}

type Tcodetype

type Tcodetype = int32

type Tcompress_func

type Tcompress_func = uintptr

type Tconfig

type Tconfig = struct {
	Fgood_length Tush
	Fmax_lazy    Tush
	Fnice_length Tush
	Fmax_chain   Tush
	Ffunc1       Tcompress_func
}

C documentation

/* Values for max_lazy_match, good_match and max_chain_length, depending on
 * the desired pack level (0..9). The values given below have been tuned to
 * exclude worst case performance for pathological files. Better values may be
 * found for specific files.
 */

type Tconfig_s

type Tconfig_s = Tconfig

C documentation

/* Values for max_lazy_match, good_match and max_chain_length, depending on
 * the desired pack level (0..9). The values given below have been tuned to
 * exclude worst case performance for pathological files. Better values may be
 * found for specific files.
 */

type Tcookie_io_functions_t

type Tcookie_io_functions_t = struct {
	Fread   uintptr
	Fwrite  uintptr
	Fseek   uintptr
	Fclose1 uintptr
}

type Tct_data

type Tct_data = struct {
	Ffc struct {
		Fcode [0]Tush
		Ffreq Tush
	}
	Fdl struct {
		Flen1 [0]Tush
		Fdad  Tush
	}
}

type Tct_data_s

type Tct_data_s = Tct_data

type Tdeflate_state

type Tdeflate_state = struct {
	Fstrm             Tz_streamp
	Fstatus           int32
	Fpending_buf      uintptr
	Fpending_buf_size Tulg
	Fpending_out      uintptr
	Fpending          Tulg
	Fwrap             int32
	Fgzhead           Tgz_headerp
	Fgzindex          Tulg
	Fmethod           TByte
	Flast_flush       int32
	Fw_size           TuInt
	Fw_bits           TuInt
	Fw_mask           TuInt
	Fwindow           uintptr
	Fwindow_size      Tulg
	Fprev             uintptr
	Fhead             uintptr
	Fins_h            TuInt
	Fhash_size        TuInt
	Fhash_bits        TuInt
	Fhash_mask        TuInt
	Fhash_shift       TuInt
	Fblock_start      int64
	Fmatch_length     TuInt
	Fprev_match       TIPos
	Fmatch_available  int32
	Fstrstart         TuInt
	Fmatch_start      TuInt
	Flookahead        TuInt
	Fprev_length      TuInt
	Fmax_chain_length TuInt
	Fmax_lazy_match   TuInt
	Flevel            int32
	Fstrategy         int32
	Fgood_match       TuInt
	Fnice_match       int32
	Fdyn_ltree        [573]Tct_data_s
	Fdyn_dtree        [61]Tct_data_s
	Fbl_tree          [39]Tct_data_s
	Fl_desc           Ttree_desc_s
	Fd_desc           Ttree_desc_s
	Fbl_desc          Ttree_desc_s
	Fbl_count         [16]Tush
	Fheap             [573]int32
	Fheap_len         int32
	Fheap_max         int32
	Fdepth            [573]Tuch
	Fsym_buf          uintptr
	Flit_bufsize      TuInt
	Fsym_next         TuInt
	Fsym_end          TuInt
	Fopt_len          Tulg
	Fstatic_len       Tulg
	Fmatches          TuInt
	Finsert           TuInt
	Fbi_buf           Tush
	Fbi_valid         int32
	Fbi_used          int32
	Fhigh_water       Tulg
	Fslid             int32
}

type Tdev_t

type Tdev_t = uint64

type Tdiv_t

type Tdiv_t = struct {
	Fquot int32
	Frem  int32
}

type Tf_owner_ex

type Tf_owner_ex = struct {
	Ftype1 int32
	Fpid   Tpid_t
}

type Tfd_mask

type Tfd_mask = uint64

type Tfd_set

type Tfd_set = struct {
	Ffds_bits [16]uint64
}

type Tfile_handle

type Tfile_handle = struct {
	Fhandle_bytes uint32
	Fhandle_type  int32
}

type Tflock

type Tflock = struct {
	Fl_type   int16
	Fl_whence int16
	Fl_start  Toff_t
	Fl_len    Toff_t
	Fl_pid    Tpid_t
}

type Tfpos_t

type Tfpos_t = struct {
	F__lldata [0]int64
	F__align  [0]float64
	F__opaque [16]int8
}

type Tfree_func

type Tfree_func = uintptr

type Tfsblkcnt_t

type Tfsblkcnt_t = uint64

type Tfsfilcnt_t

type Tfsfilcnt_t = uint64

type Tgid_t

type Tgid_t = uint32

type TgzFile

type TgzFile = uintptr

func Xgzdopen

func Xgzdopen(tls *libc.TLS, fd int32, mode uintptr) (r TgzFile)

C documentation

/* -- see zlib.h -- */

func Xgzopen

func Xgzopen(tls *libc.TLS, path uintptr, mode uintptr) (r TgzFile)

C documentation

/* -- see zlib.h -- */

func Xgzopen64

func Xgzopen64(tls *libc.TLS, path uintptr, mode uintptr) (r TgzFile)

C documentation

/* -- see zlib.h -- */

type TgzFile_s

type TgzFile_s = struct {
	Fhave uint32
	Fnext uintptr
	Fpos  Toff_t
}

type Tgz_header

type Tgz_header = struct {
	Ftext      int32
	Ftime      TuLong
	Fxflags    int32
	Fos        int32
	Fextra     uintptr
	Fextra_len TuInt
	Fextra_max TuInt
	Fname      uintptr
	Fname_max  TuInt
	Fcomment   uintptr
	Fcomm_max  TuInt
	Fhcrc      int32
	Fdone      int32
}

type Tgz_header_s

type Tgz_header_s = Tgz_header

type Tgz_headerp

type Tgz_headerp = uintptr

type Tgz_state

type Tgz_state = struct {
	Fx        TgzFile_s
	Fmode     int32
	Ffd       int32
	Fpath     uintptr
	Fsize     uint32
	Fwant     uint32
	Fin       uintptr
	Fout      uintptr
	Fdirect   int32
	Fjunk     int32
	Fhow      int32
	Fagain    int32
	Fstart    Toff_t
	Feof      int32
	Fpast     int32
	Flevel    int32
	Fstrategy int32
	Freset    int32
	Fskip     Toff_t
	Ferr      int32
	Fmsg      uintptr
	Fstrm     Tz_stream
}

type Tgz_statep

type Tgz_statep = uintptr

type Tid_t

type Tid_t = uint32

type Tin_func

type Tin_func = uintptr

type Tinflate_mode

type Tinflate_mode = int32

type Tinflate_state

type Tinflate_state = struct {
	Fstrm     Tz_streamp
	Fmode     Tinflate_mode
	Flast     int32
	Fwrap     int32
	Fhavedict int32
	Fflags    int32
	Fdmax     uint32
	Fcheck    uint64
	Ftotal    uint64
	Fhead     Tgz_headerp
	Fwbits    uint32
	Fwsize    uint32
	Fwhave    uint32
	Fwnext    uint32
	Fwindow   uintptr
	Fhold     uint64
	Fbits     uint32
	Flength   uint32
	Foffset   uint32
	Fextra    uint32
	Flencode  uintptr
	Fdistcode uintptr
	Flenbits  uint32
	Fdistbits uint32
	Fncode    uint32
	Fnlen     uint32
	Fndist    uint32
	Fhave     uint32
	Fnext     uintptr
	Flens     [320]uint16
	Fwork     [288]uint16
	Fcodes    [1444]Tcode
	Fsane     int32
	Fback     int32
	Fwas      uint32
}

type Tino_t

type Tino_t = uint64

type Tint8_t

type Tint8_t = int8

type Tint16_t

type Tint16_t = int16

type Tint32_t

type Tint32_t = int32

type Tint64_t

type Tint64_t = int64

type Tinternal_state

type Tinternal_state = struct {
	Fstrm             Tz_streamp
	Fstatus           int32
	Fpending_buf      uintptr
	Fpending_buf_size Tulg
	Fpending_out      uintptr
	Fpending          Tulg
	Fwrap             int32
	Fgzhead           Tgz_headerp
	Fgzindex          Tulg
	Fmethod           TByte
	Flast_flush       int32
	Fw_size           TuInt
	Fw_bits           TuInt
	Fw_mask           TuInt
	Fwindow           uintptr
	Fwindow_size      Tulg
	Fprev             uintptr
	Fhead             uintptr
	Fins_h            TuInt
	Fhash_size        TuInt
	Fhash_bits        TuInt
	Fhash_mask        TuInt
	Fhash_shift       TuInt
	Fblock_start      int64
	Fmatch_length     TuInt
	Fprev_match       TIPos
	Fmatch_available  int32
	Fstrstart         TuInt
	Fmatch_start      TuInt
	Flookahead        TuInt
	Fprev_length      TuInt
	Fmax_chain_length TuInt
	Fmax_lazy_match   TuInt
	Flevel            int32
	Fstrategy         int32
	Fgood_match       TuInt
	Fnice_match       int32
	Fdyn_ltree        [573]Tct_data_s
	Fdyn_dtree        [61]Tct_data_s
	Fbl_tree          [39]Tct_data_s
	Fl_desc           Ttree_desc_s
	Fd_desc           Ttree_desc_s
	Fbl_desc          Ttree_desc_s
	Fbl_count         [16]Tush
	Fheap             [573]int32
	Fheap_len         int32
	Fheap_max         int32
	Fdepth            [573]Tuch
	Fsym_buf          uintptr
	Flit_bufsize      TuInt
	Fsym_next         TuInt
	Fsym_end          TuInt
	Fopt_len          Tulg
	Fstatic_len       Tulg
	Fmatches          TuInt
	Finsert           TuInt
	Fbi_buf           Tush
	Fbi_valid         int32
	Fbi_used          int32
	Fhigh_water       Tulg
	Fslid             int32
}

type Tintf

type Tintf = int32

type Tintptr_t

type Tintptr_t = int64

type Tiovec

type Tiovec = struct {
	Fiov_base uintptr
	Fiov_len  Tsize_t
}

type Tkey_t

type Tkey_t = int32

type Tldiv_t

type Tldiv_t = struct {
	Fquot int64
	Frem  int64
}

type Tlldiv_t

type Tlldiv_t = struct {
	Fquot int64
	Frem  int64
}

type Tlocale_t

type Tlocale_t = uintptr

type Tmax_align_t

type Tmax_align_t = struct {
	F__ll int64
	F__ld float64
}

type Tmode_t

type Tmode_t = uint32
type Tnlink_t = uint64

type Toff_t

type Toff_t = int64

func Xgzoffset

func Xgzoffset(tls *libc.TLS, file TgzFile) (r Toff_t)

C documentation

/* -- see zlib.h -- */

func Xgzoffset64

func Xgzoffset64(tls *libc.TLS, file TgzFile) (r Toff_t)

C documentation

/* -- see zlib.h -- */

func Xgzseek

func Xgzseek(tls *libc.TLS, file TgzFile, offset Toff_t, whence int32) (r Toff_t)

C documentation

/* -- see zlib.h -- */

func Xgzseek64

func Xgzseek64(tls *libc.TLS, file TgzFile, offset Toff_t, whence int32) (r Toff_t)

C documentation

/* -- see zlib.h -- */

func Xgztell

func Xgztell(tls *libc.TLS, file TgzFile) (r Toff_t)

C documentation

/* -- see zlib.h -- */

func Xgztell64

func Xgztell64(tls *libc.TLS, file TgzFile) (r Toff_t)

C documentation

/* -- see zlib.h -- */

type Tout_func

type Tout_func = uintptr

type Tpid_t

type Tpid_t = int32

type Tpthread_attr_t

type Tpthread_attr_t = struct {
	F__u struct {
		F__vi [0][14]int32
		F__s  [0][7]uint64
		F__i  [14]int32
	}
}

type Tpthread_barrier_t

type Tpthread_barrier_t = struct {
	F__u struct {
		F__vi [0][8]int32
		F__p  [0][4]uintptr
		F__i  [8]int32
	}
}

type Tpthread_barrierattr_t

type Tpthread_barrierattr_t = struct {
	F__attr uint32
}

type Tpthread_cond_t

type Tpthread_cond_t = struct {
	F__u struct {
		F__vi [0][12]int32
		F__p  [0][6]uintptr
		F__i  [12]int32
	}
}

type Tpthread_condattr_t

type Tpthread_condattr_t = struct {
	F__attr uint32
}

type Tpthread_key_t

type Tpthread_key_t = uint32

type Tpthread_mutex_t

type Tpthread_mutex_t = struct {
	F__u struct {
		F__vi [0][10]int32
		F__p  [0][5]uintptr
		F__i  [10]int32
	}
}

type Tpthread_mutexattr_t

type Tpthread_mutexattr_t = struct {
	F__attr uint32
}

type Tpthread_once_t

type Tpthread_once_t = int32

type Tpthread_rwlock_t

type Tpthread_rwlock_t = struct {
	F__u struct {
		F__vi [0][14]int32
		F__p  [0][7]uintptr
		F__i  [14]int32
	}
}

type Tpthread_rwlockattr_t

type Tpthread_rwlockattr_t = struct {
	F__attr [2]uint32
}

type Tpthread_spinlock_t

type Tpthread_spinlock_t = int32

type Tpthread_t

type Tpthread_t = uintptr

type Tptrdiff_t

type Tptrdiff_t = int64

type Tquad_t

type Tquad_t = int64

type Tregister_t

type Tregister_t = int64

type Tsigset_t

type Tsigset_t = struct {
	F__bits [16]uint64
}

type Tsize_t

type Tsize_t = uint64

type Tssize_t

type Tssize_t = int64

type Tstatic_tree_desc

type Tstatic_tree_desc = struct {
	Fstatic_tree uintptr
	Fextra_bits  uintptr
	Fextra_base  int32
	Felems       int32
	Fmax_length  int32
}

type Tstatic_tree_desc_s

type Tstatic_tree_desc_s = Tstatic_tree_desc

type Tsuseconds_t

type Tsuseconds_t = int64

type Ttime_t

type Ttime_t = int64

type Ttimer_t

type Ttimer_t = uintptr

type Ttimespec

type Ttimespec = struct {
	Ftv_sec  Ttime_t
	Ftv_nsec int64
}

type Ttimeval

type Ttimeval = struct {
	Ftv_sec  Ttime_t
	Ftv_usec Tsuseconds_t
}

type Ttree_desc

type Ttree_desc = struct {
	Fdyn_tree  uintptr
	Fmax_code  int32
	Fstat_desc uintptr
}

type Ttree_desc_s

type Ttree_desc_s = Ttree_desc

type TuInt

type TuInt = uint32

type TuIntf

type TuIntf = uint32

type TuLong

type TuLong = uint64

func Xadler32

func Xadler32(tls *libc.TLS, adler TuLong, buf uintptr, len1 TuInt) (r TuLong)

C documentation

/* ========================================================================= */

func Xadler32_combine

func Xadler32_combine(tls *libc.TLS, adler1 TuLong, adler2 TuLong, len2 Toff_t) (r TuLong)

C documentation

/* ========================================================================= */

func Xadler32_combine64

func Xadler32_combine64(tls *libc.TLS, adler1 TuLong, adler2 TuLong, len2 Toff_t) (r TuLong)

func Xadler32_z

func Xadler32_z(tls *libc.TLS, adler TuLong, buf uintptr, len1 Tz_size_t) (r TuLong)

C documentation

/* ========================================================================= */

func XcompressBound

func XcompressBound(tls *libc.TLS, sourceLen TuLong) (r TuLong)

func Xcrc32

func Xcrc32(tls *libc.TLS, crc TuLong, buf uintptr, len1 TuInt) (r TuLong)

C documentation

/* ========================================================================= */

func Xcrc32_combine

func Xcrc32_combine(tls *libc.TLS, crc1 TuLong, crc2 TuLong, len2 Toff_t) (r TuLong)

C documentation

/* ========================================================================= */

func Xcrc32_combine64

func Xcrc32_combine64(tls *libc.TLS, crc1 TuLong, crc2 TuLong, len2 Toff_t) (r TuLong)

C documentation

/* ========================================================================= */

func Xcrc32_combine_gen

func Xcrc32_combine_gen(tls *libc.TLS, len2 Toff_t) (r TuLong)

C documentation

/* ========================================================================= */

func Xcrc32_combine_gen64

func Xcrc32_combine_gen64(tls *libc.TLS, len2 Toff_t) (r TuLong)

C documentation

/* ========================================================================= */

func Xcrc32_combine_op

func Xcrc32_combine_op(tls *libc.TLS, crc1 TuLong, crc2 TuLong, op TuLong) (r TuLong)

C documentation

/* ========================================================================= */

func Xcrc32_z

func Xcrc32_z(tls *libc.TLS, crc TuLong, buf uintptr, len1 Tz_size_t) (r TuLong)

C documentation

/* ========================================================================= */

func XdeflateBound

func XdeflateBound(tls *libc.TLS, strm Tz_streamp, sourceLen TuLong) (r TuLong)

func XzlibCompileFlags

func XzlibCompileFlags(tls *libc.TLS) (r TuLong)

type TuLongf

type TuLongf = uint64

type Tu_char

type Tu_char = uint8

type Tu_int

type Tu_int = uint32

type Tu_int8_t

type Tu_int8_t = uint8

type Tu_int16_t

type Tu_int16_t = uint16

type Tu_int32_t

type Tu_int32_t = uint32

type Tu_int64_t

type Tu_int64_t = uint64

type Tu_long

type Tu_long = uint64

type Tu_quad_t

type Tu_quad_t = uint64

type Tu_short

type Tu_short = uint16

type Tuch

type Tuch = uint8

type Tuchf

type Tuchf = uint8

type Tuid_t

type Tuid_t = uint32

type Tuint

type Tuint = uint32

type Tuint16_t

type Tuint16_t = uint16

type Tuint32_t

type Tuint32_t = uint32

type Tuint64_t

type Tuint64_t = uint64

type Tulg

type Tulg = uint64

type Tulong

type Tulong = uint64

type Tuseconds_t

type Tuseconds_t = uint32

type Tush

type Tush = uint16

type Tushf

type Tushf = uint16

type Tushort

type Tushort = uint16

type Tva_list

type Tva_list = uintptr

type Tvoidp

type Tvoidp = uintptr

type Tvoidpc

type Tvoidpc = uintptr

type Tvoidpf

type Tvoidpf = uintptr

func Xzcalloc

func Xzcalloc(tls *libc.TLS, opaque Tvoidpf, items uint32, size uint32) (r Tvoidpf)

type Twchar_t

type Twchar_t = int32

type Tz_crc_t

type Tz_crc_t = uint32

type Tz_size_t

type Tz_size_t = uint64

func XcompressBound_z

func XcompressBound_z(tls *libc.TLS, sourceLen Tz_size_t) (r Tz_size_t)

C documentation

/* ===========================================================================
     If the default memLevel or windowBits for deflateInit() is changed, then
   this function needs to be updated.
 */

func XdeflateBound_z

func XdeflateBound_z(tls *libc.TLS, strm Tz_streamp, sourceLen Tz_size_t) (r Tz_size_t)

C documentation

/* =========================================================================
 * For the default windowBits of 15 and memLevel of 8, this function returns a
 * close to exact, as well as small, upper bound on the compressed size. This
 * is an expansion of ~0.03%, plus a small constant.
 *
 * For any setting other than those defaults for windowBits and memLevel, one
 * of two worst case bounds is returned. This is at most an expansion of ~4% or
 * ~13%, plus a small constant.
 *
 * Both the 0.03% and 4% derive from the overhead of stored blocks. The first
 * one is for stored blocks of 16383 bytes (memLevel == 8), whereas the second
 * is for stored blocks of 127 bytes (the worst case memLevel == 1). The
 * expansion results from five bytes of header for each stored block.
 *
 * The larger expansion of 13% results from a window size less than or equal to
 * the symbols buffer size (windowBits <= memLevel + 7). In that case some of
 * the data being compressed may have slid out of the sliding window, impeding
 * a stored block from being emitted. Then the only choice is a fixed or
 * dynamic block, where a fixed block limits the maximum expansion to 9 bits
 * per 8-bit byte, plus 10 bits for every block. The smallest block size for
 * which this can occur is 255 (memLevel == 2).
 *
 * Shifts are used to approximate divisions, for speed.
 */

func Xgzfread

func Xgzfread(tls *libc.TLS, buf Tvoidp, size Tz_size_t, nitems Tz_size_t, file TgzFile) (r Tz_size_t)

C documentation

/* -- see zlib.h -- */

func Xgzfwrite

func Xgzfwrite(tls *libc.TLS, buf Tvoidpc, size Tz_size_t, nitems Tz_size_t, file TgzFile) (r Tz_size_t)

C documentation

/* -- see zlib.h -- */

type Tz_stream

type Tz_stream = struct {
	Fnext_in   uintptr
	Favail_in  TuInt
	Ftotal_in  TuLong
	Fnext_out  uintptr
	Favail_out TuInt
	Ftotal_out TuLong
	Fmsg       uintptr
	Fstate     uintptr
	Fzalloc    Talloc_func
	Fzfree     Tfree_func
	Fopaque    Tvoidpf
	Fdata_type int32
	Fadler     TuLong
	Freserved  TuLong
}

type Tz_stream_s

type Tz_stream_s = Tz_stream

type Tz_streamp

type Tz_streamp = uintptr

type Tz_word_t

type Tz_word_t = uint64

C documentation

/*
  Define W and the associated z_word_t type. If W is not defined, then a
  braided calculation is not used, and the associated tables and code are not
  compiled.
 */

Directories

Path Synopsis
internal
example command
minigzip command

Jump to

Keyboard shortcuts

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