Documentation
¶
Overview ¶
Package libz is a ccgo4 version of the zlib general purpose data compression library.
Index ¶
- Variables
- func Xcompress(tls *libc.TLS, dest uintptr, destLen uintptr, source uintptr, sourceLen TuLong) (r int32)
- func Xcompress2(tls *libc.TLS, dest uintptr, destLen uintptr, source uintptr, sourceLen TuLong, ...) (r int32)
- func Xcompress2_z(tls *libc.TLS, dest uintptr, destLen uintptr, source uintptr, ...) (r int32)
- func Xcompress_z(tls *libc.TLS, dest uintptr, destLen uintptr, source uintptr, ...) (r int32)
- func Xdeflate(tls *libc.TLS, strm Tz_streamp, flush int32) (r int32)
- func XdeflateCopy(tls *libc.TLS, dest Tz_streamp, source Tz_streamp) (r int32)
- func XdeflateEnd(tls *libc.TLS, strm Tz_streamp) (r int32)
- func XdeflateGetDictionary(tls *libc.TLS, strm Tz_streamp, dictionary uintptr, dictLength uintptr) (r int32)
- func XdeflateInit2_(tls *libc.TLS, strm Tz_streamp, level int32, method int32, windowBits int32, ...) (r int32)
- func XdeflateInit_(tls *libc.TLS, strm Tz_streamp, level int32, version uintptr, ...) (r int32)
- func XdeflateParams(tls *libc.TLS, strm Tz_streamp, level int32, strategy int32) (r int32)
- func XdeflatePending(tls *libc.TLS, strm Tz_streamp, pending uintptr, bits uintptr) (r int32)
- func XdeflatePrime(tls *libc.TLS, strm Tz_streamp, bits int32, value int32) (r int32)
- func XdeflateReset(tls *libc.TLS, strm Tz_streamp) (r int32)
- func XdeflateResetKeep(tls *libc.TLS, strm Tz_streamp) (r int32)
- func XdeflateSetDictionary(tls *libc.TLS, strm Tz_streamp, dictionary uintptr, dictLength TuInt) (r int32)
- func XdeflateSetHeader(tls *libc.TLS, strm Tz_streamp, head Tgz_headerp) (r int32)
- func XdeflateTune(tls *libc.TLS, strm Tz_streamp, good_length int32, max_lazy int32, ...) (r int32)
- func XdeflateUsed(tls *libc.TLS, strm Tz_streamp, bits uintptr) (r int32)
- func Xget_crc_table(tls *libc.TLS) (r uintptr)
- func Xgz_error(tls *libc.TLS, state Tgz_statep, err int32, msg uintptr)
- func Xgz_intmax(tls *libc.TLS) (r uint32)
- func Xgzbuffer(tls *libc.TLS, file TgzFile, size uint32) (r int32)
- func Xgzclearerr(tls *libc.TLS, file TgzFile)
- func Xgzclose(tls *libc.TLS, file TgzFile) (r int32)
- func Xgzclose_r(tls *libc.TLS, file TgzFile) (r int32)
- func Xgzclose_w(tls *libc.TLS, file TgzFile) (r int32)
- func Xgzdirect(tls *libc.TLS, file TgzFile) (r int32)
- func Xgzeof(tls *libc.TLS, file TgzFile) (r int32)
- func Xgzerror(tls *libc.TLS, file TgzFile, errnum uintptr) (r uintptr)
- func Xgzflush(tls *libc.TLS, file TgzFile, flush int32) (r int32)
- func Xgzgetc(tls *libc.TLS, file TgzFile) (r int32)
- func Xgzgetc_(tls *libc.TLS, file TgzFile) (r int32)
- func Xgzgets(tls *libc.TLS, file TgzFile, buf uintptr, len1 int32) (r uintptr)
- func Xgzprintf(tls *libc.TLS, file TgzFile, format uintptr, va1 uintptr) (r int32)
- func Xgzputc(tls *libc.TLS, file TgzFile, c int32) (r int32)
- func Xgzputs(tls *libc.TLS, file TgzFile, s uintptr) (r int32)
- func Xgzread(tls *libc.TLS, file TgzFile, buf Tvoidp, len1 uint32) (r int32)
- func Xgzrewind(tls *libc.TLS, file TgzFile) (r int32)
- func Xgzsetparams(tls *libc.TLS, file TgzFile, level int32, strategy int32) (r int32)
- func Xgzungetc(tls *libc.TLS, c int32, file TgzFile) (r int32)
- func Xgzvprintf(tls *libc.TLS, file TgzFile, format uintptr, va Tva_list) (r int32)
- func Xgzwrite(tls *libc.TLS, file TgzFile, buf Tvoidpc, len1 uint32) (r int32)
- func Xinflate(tls *libc.TLS, strm Tz_streamp, flush int32) (r int32)
- func XinflateBack(tls *libc.TLS, strm Tz_streamp, __ccgo_fp_in Tin_func, in_desc uintptr, ...) (r int32)
- func XinflateBackEnd(tls *libc.TLS, strm Tz_streamp) (r int32)
- func XinflateBackInit_(tls *libc.TLS, strm Tz_streamp, windowBits int32, window uintptr, ...) (r int32)
- func XinflateCodesUsed(tls *libc.TLS, strm Tz_streamp) (r uint64)
- func XinflateCopy(tls *libc.TLS, dest Tz_streamp, source Tz_streamp) (r int32)
- func XinflateEnd(tls *libc.TLS, strm Tz_streamp) (r int32)
- func XinflateGetDictionary(tls *libc.TLS, strm Tz_streamp, dictionary uintptr, dictLength uintptr) (r int32)
- func XinflateGetHeader(tls *libc.TLS, strm Tz_streamp, head Tgz_headerp) (r int32)
- func XinflateInit2_(tls *libc.TLS, strm Tz_streamp, windowBits int32, version uintptr, ...) (r int32)
- func XinflateInit_(tls *libc.TLS, strm Tz_streamp, version uintptr, stream_size int32) (r int32)
- func XinflateMark(tls *libc.TLS, strm Tz_streamp) (r int64)
- func XinflatePrime(tls *libc.TLS, strm Tz_streamp, bits int32, value int32) (r int32)
- func XinflateReset(tls *libc.TLS, strm Tz_streamp) (r int32)
- func XinflateReset2(tls *libc.TLS, strm Tz_streamp, windowBits int32) (r int32)
- func XinflateResetKeep(tls *libc.TLS, strm Tz_streamp) (r int32)
- func XinflateSetDictionary(tls *libc.TLS, strm Tz_streamp, dictionary uintptr, dictLength TuInt) (r int32)
- func XinflateSync(tls *libc.TLS, strm Tz_streamp) (r int32)
- func XinflateSyncPoint(tls *libc.TLS, strm Tz_streamp) (r int32)
- func XinflateUndermine(tls *libc.TLS, strm Tz_streamp, subvert int32) (r int32)
- func XinflateValidate(tls *libc.TLS, strm Tz_streamp, check int32) (r int32)
- func Xinflate_fast(tls *libc.TLS, strm Tz_streamp, start uint32)
- func Xinflate_fixed(tls *libc.TLS, state uintptr)
- func Xinflate_table(tls *libc.TLS, type1 Tcodetype, lens uintptr, codes uint32, table uintptr, ...) (r int32)
- func Xuncompress(tls *libc.TLS, dest uintptr, destLen uintptr, source uintptr, sourceLen TuLong) (r int32)
- func Xuncompress2(tls *libc.TLS, dest uintptr, destLen uintptr, source uintptr, ...) (r int32)
- func Xuncompress2_z(tls *libc.TLS, dest uintptr, destLen uintptr, source uintptr, ...) (r int32)
- func Xuncompress_z(tls *libc.TLS, dest uintptr, destLen uintptr, source uintptr, ...) (r int32)
- func XzError(tls *libc.TLS, err int32) (r uintptr)
- func Xzcfree(tls *libc.TLS, opaque Tvoidpf, ptr Tvoidpf)
- func XzlibVersion(tls *libc.TLS) (r uintptr)
- type TByte
- type TBytef
- type TIPos
- type TPos
- type TPosf
- type T_G_fpos64_t
- type T_IO_cookie_io_functions_t
- type Talloc_func
- type Tblkcnt_t
- type Tblksize_t
- type Tblock_state
- type Tcaddr_t
- type Tcharf
- type Tclock_t
- type Tclockid_t
- type Tcode
- type Tcodetype
- type Tcompress_func
- type Tconfig
- type Tconfig_s
- type Tcookie_io_functions_t
- type Tct_data
- type Tct_data_s
- type Tdeflate_state
- type Tdev_t
- type Tdiv_t
- type Tf_owner_ex
- type Tfd_mask
- type Tfd_set
- type Tfile_handle
- type Tflock
- type Tfpos_t
- type Tfree_func
- type Tfsblkcnt_t
- type Tfsfilcnt_t
- type Tgid_t
- type TgzFile
- type TgzFile_s
- type Tgz_header
- type Tgz_header_s
- type Tgz_headerp
- type Tgz_state
- type Tgz_statep
- type Tid_t
- type Tin_func
- type Tinflate_mode
- type Tinflate_state
- type Tino_t
- type Tint8_t
- type Tint16_t
- type Tint32_t
- type Tint64_t
- type Tinternal_state
- type Tintf
- type Tintptr_t
- type Tiovec
- type Tkey_t
- type Tldiv_t
- type Tlldiv_t
- type Tlocale_t
- type Tmax_align_t
- type Tmode_t
- type Tnlink_t
- type Toff_t
- func Xgzoffset(tls *libc.TLS, file TgzFile) (r Toff_t)
- func Xgzoffset64(tls *libc.TLS, file TgzFile) (r Toff_t)
- func Xgzseek(tls *libc.TLS, file TgzFile, offset Toff_t, whence int32) (r Toff_t)
- func Xgzseek64(tls *libc.TLS, file TgzFile, offset Toff_t, whence int32) (r Toff_t)
- func Xgztell(tls *libc.TLS, file TgzFile) (r Toff_t)
- func Xgztell64(tls *libc.TLS, file TgzFile) (r Toff_t)
- type Tout_func
- type Tpid_t
- type Tpthread_attr_t
- type Tpthread_barrier_t
- type Tpthread_barrierattr_t
- type Tpthread_cond_t
- type Tpthread_condattr_t
- type Tpthread_key_t
- type Tpthread_mutex_t
- type Tpthread_mutexattr_t
- type Tpthread_once_t
- type Tpthread_rwlock_t
- type Tpthread_rwlockattr_t
- type Tpthread_spinlock_t
- type Tpthread_t
- type Tptrdiff_t
- type Tquad_t
- type Tregister_t
- type Tsigset_t
- type Tsize_t
- type Tssize_t
- type Tstatic_tree_desc
- type Tstatic_tree_desc_s
- type Tsuseconds_t
- type Ttime_t
- type Ttimer_t
- type Ttimespec
- type Ttimeval
- type Ttree_desc
- type Ttree_desc_s
- type TuInt
- type TuIntf
- type TuLong
- func Xadler32(tls *libc.TLS, adler TuLong, buf uintptr, len1 TuInt) (r TuLong)
- func Xadler32_combine(tls *libc.TLS, adler1 TuLong, adler2 TuLong, len2 Toff_t) (r TuLong)
- func Xadler32_combine64(tls *libc.TLS, adler1 TuLong, adler2 TuLong, len2 Toff_t) (r TuLong)
- func Xadler32_z(tls *libc.TLS, adler TuLong, buf uintptr, len1 Tz_size_t) (r TuLong)
- func XcompressBound(tls *libc.TLS, sourceLen TuLong) (r TuLong)
- func Xcrc32(tls *libc.TLS, crc TuLong, buf uintptr, len1 TuInt) (r TuLong)
- func Xcrc32_combine(tls *libc.TLS, crc1 TuLong, crc2 TuLong, len2 Toff_t) (r TuLong)
- func Xcrc32_combine64(tls *libc.TLS, crc1 TuLong, crc2 TuLong, len2 Toff_t) (r TuLong)
- func Xcrc32_combine_gen(tls *libc.TLS, len2 Toff_t) (r TuLong)
- func Xcrc32_combine_gen64(tls *libc.TLS, len2 Toff_t) (r TuLong)
- func Xcrc32_combine_op(tls *libc.TLS, crc1 TuLong, crc2 TuLong, op TuLong) (r TuLong)
- func Xcrc32_z(tls *libc.TLS, crc TuLong, buf uintptr, len1 Tz_size_t) (r TuLong)
- func XdeflateBound(tls *libc.TLS, strm Tz_streamp, sourceLen TuLong) (r TuLong)
- func XzlibCompileFlags(tls *libc.TLS) (r TuLong)
- type TuLongf
- type Tu_char
- type Tu_int
- type Tu_int8_t
- type Tu_int16_t
- type Tu_int32_t
- type Tu_int64_t
- type Tu_long
- type Tu_quad_t
- type Tu_short
- type Tuch
- type Tuchf
- type Tuid_t
- type Tuint
- type Tuint16_t
- type Tuint32_t
- type Tuint64_t
- type Tulg
- type Tulong
- type Tuseconds_t
- type Tush
- type Tushf
- type Tushort
- type Tva_list
- type Tvoidp
- type Tvoidpc
- type Tvoidpf
- type Twchar_t
- type Tz_crc_t
- type Tz_size_t
- func XcompressBound_z(tls *libc.TLS, sourceLen Tz_size_t) (r Tz_size_t)
- func XdeflateBound_z(tls *libc.TLS, strm Tz_streamp, sourceLen Tz_size_t) (r Tz_size_t)
- func Xgzfread(tls *libc.TLS, buf Tvoidp, size Tz_size_t, nitems Tz_size_t, file TgzFile) (r Tz_size_t)
- func Xgzfwrite(tls *libc.TLS, buf Tvoidpc, size Tz_size_t, nitems Tz_size_t, file TgzFile) (r Tz_size_t)
- type Tz_stream
- type Tz_stream_s
- type Tz_streamp
- type Tz_word_t
Constants ¶
This section is empty.
Variables ¶
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', ' '}
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', ' '}
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 Xcompress2 ¶
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 ¶
C documentation
/* ========================================================================= */
func XdeflatePending ¶
C documentation
/* ========================================================================= */
func XdeflatePrime ¶
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 ¶
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 ¶
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 Xgzclose ¶
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 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 XinflateGetHeader ¶
func XinflateGetHeader(tls *libc.TLS, strm Tz_streamp, head Tgz_headerp) (r int32)
func XinflateInit2_ ¶
func XinflateInit_ ¶
func XinflateMark ¶
func XinflateMark(tls *libc.TLS, strm Tz_streamp) (r int64)
func XinflatePrime ¶
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 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 ¶
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 Xuncompress2 ¶
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 XzError ¶
C documentation
/* exported to allow conversion of error code to string for compress() and * uncompress() */
func XzlibVersion ¶
Types ¶
type T_G_fpos64_t ¶
type T_G_fpos64_t = Tfpos_t
type T_IO_cookie_io_functions_t ¶
type T_IO_cookie_io_functions_t = Tcookie_io_functions_t
type Talloc_func ¶
type Talloc_func = uintptr
type Tblksize_t ¶
type Tblksize_t = int64
type Tblock_state ¶
type Tblock_state = int32
type Tclockid_t ¶
type Tclockid_t = 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 {
}
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 Tf_owner_ex ¶
type Tfile_handle ¶
type Tfree_func ¶
type Tfree_func = uintptr
type Tfsblkcnt_t ¶
type Tfsblkcnt_t = uint64
type Tfsfilcnt_t ¶
type Tfsfilcnt_t = uint64
type TgzFile ¶
type TgzFile = uintptr
type Tgz_header ¶
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 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 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 Tmax_align_t ¶
type Toff_t ¶
type Toff_t = int64
type Tpthread_attr_t ¶
type Tpthread_barrier_t ¶
type Tpthread_barrierattr_t ¶
type Tpthread_barrierattr_t = struct {
F__attr uint32
}
type Tpthread_cond_t ¶
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_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_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 Tregister_t ¶
type Tregister_t = int64
type Tstatic_tree_desc ¶
type Tstatic_tree_desc_s ¶
type Tstatic_tree_desc_s = Tstatic_tree_desc
type Tsuseconds_t ¶
type Tsuseconds_t = int64
type Ttimeval ¶
type Ttimeval = struct {
Ftv_sec Ttime_t
Ftv_usec Tsuseconds_t
}
type Ttree_desc ¶
type Ttree_desc_s ¶
type Ttree_desc_s = Ttree_desc
type TuLong ¶
type TuLong = uint64
func Xadler32 ¶
C documentation
/* ========================================================================= */
func Xadler32_combine ¶
C documentation
/* ========================================================================= */
func Xadler32_combine64 ¶
func Xadler32_z ¶
C documentation
/* ========================================================================= */
func Xcrc32 ¶
C documentation
/* ========================================================================= */
func Xcrc32_combine ¶
C documentation
/* ========================================================================= */
func Xcrc32_combine64 ¶
C documentation
/* ========================================================================= */
func Xcrc32_combine_gen ¶
C documentation
/* ========================================================================= */
func Xcrc32_combine_gen64 ¶
C documentation
/* ========================================================================= */
func Xcrc32_combine_op ¶
C documentation
/* ========================================================================= */
func Xcrc32_z ¶
C documentation
/* ========================================================================= */
func XdeflateBound ¶
func XdeflateBound(tls *libc.TLS, strm Tz_streamp, sourceLen TuLong) (r TuLong)
func XzlibCompileFlags ¶
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 Tuseconds_t ¶
type Tuseconds_t = uint32
type Tz_size_t ¶
type Tz_size_t = uint64
func XcompressBound_z ¶
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. */
type Tz_stream_s ¶
type Tz_stream_s = Tz_stream
type Tz_streamp ¶
type Tz_streamp = uintptr