126 lines
4.5 KiB
Python
126 lines
4.5 KiB
Python
"""
|
|
Auto-generated Python stub file from zlib.pyzlib.py
|
|
Module: zlib.pyzlib
|
|
"""
|
|
|
|
|
|
from stdint import *
|
|
import zlib.zdeflate as zdeflate
|
|
import zlib.zinflate as zinflate
|
|
import zlib.zchecksum as zchecksum
|
|
import zlib.zdef as zdef
|
|
import zlib.zhuff as zhuff
|
|
import stdlib
|
|
import string
|
|
import memhub
|
|
import t, c
|
|
|
|
Z_NO_COMPRESSION: t.CDefine = 0
|
|
Z_BEST_SPEED: t.CDefine = 1
|
|
Z_BEST_COMPRESSION: t.CDefine = 9
|
|
Z_DEFAULT_COMPRESSION: t.CDefine = (-1)
|
|
DEFLATED: t.CDefine = 8
|
|
Z_NO_FLUSH: t.CDefine = 0
|
|
Z_PARTIAL_FLUSH: t.CDefine = 1
|
|
Z_SYNC_FLUSH: t.CDefine = 2
|
|
Z_FULL_FLUSH: t.CDefine = 3
|
|
Z_FINISH: t.CDefine = 4
|
|
Z_BLOCK: t.CDefine = 5
|
|
Z_TREES: t.CDefine = 6
|
|
Z_DEFAULT_STRATEGY: t.CDefine = 0
|
|
Z_FILTERED: t.CDefine = 1
|
|
Z_HUFFMAN_ONLY: t.CDefine = 2
|
|
Z_RLE: t.CDefine = 3
|
|
Z_FIXED: t.CDefine = 4
|
|
Z_OK: t.CDefine = 0
|
|
Z_STREAM_END: t.CDefine = 1
|
|
Z_NEED_DICT: t.CDefine = 2
|
|
Z_ERRNO: t.CDefine = (-1)
|
|
Z_STREAM_ERROR: t.CDefine = (-2)
|
|
Z_DATA_ERROR: t.CDefine = (-3)
|
|
Z_MEM_ERROR: t.CDefine = (-4)
|
|
Z_BUF_ERROR: t.CDefine = (-5)
|
|
Z_VERSION_ERROR: t.CDefine = (-6)
|
|
MAX_WBITS: t.CDefine = 15
|
|
DEF_BUF_SIZE: t.CDefine = 16384
|
|
DEF_MEM_LEVEL: t.CDefine = 8
|
|
ZLIB_VERSION: t.CDefine = "1.3.2"
|
|
pyzlib_error_msg: t.CExtern | t.CArray[t.CChar, 512]
|
|
pyzlib_error_code_val: t.CExtern | t.CInt
|
|
|
|
@t.Object
|
|
class Compress:
|
|
pool: memhub.MemManager | t.CPtr
|
|
stream: VOIDPTR
|
|
is_initialized: t.CInt
|
|
is_finished: t.CInt
|
|
level: t.CInt
|
|
method: t.CInt
|
|
wbits: t.CInt
|
|
memLevel: t.CInt
|
|
strategy: t.CInt
|
|
zdict: BYTEPTR
|
|
zdict_len: t.CSizeT
|
|
last_pos: t.CSizeT
|
|
input_buf: BYTEPTR
|
|
input_buf_len: t.CSizeT
|
|
input_buf_cap: t.CSizeT
|
|
header_written: t.CInt
|
|
def compress(self: Compress, data: BYTEPTR, data_len: t.CSizeT, out_len: t.CSizeT | t.CPtr) -> BYTEPTR: pass
|
|
def flush(self: Compress, mode: t.CInt, out_len: t.CSizeT | t.CPtr) -> BYTEPTR: pass
|
|
def copy(self: Compress) -> Compress | t.CPtr: pass
|
|
def delete(self: Compress) -> t.CInt: pass
|
|
def __del__(self: Compress) -> t.CInt: pass
|
|
@t.Object
|
|
class Decompress:
|
|
pool: memhub.MemManager | t.CPtr
|
|
stream: VOIDPTR
|
|
is_initialized: t.CInt
|
|
eof: t.CInt
|
|
wbits: t.CInt
|
|
zdict: BYTEPTR
|
|
zdict_len: t.CSizeT
|
|
_unused_data: BYTEPTR
|
|
_unused_data_len: t.CSizeT
|
|
_unused_data_cap: t.CSizeT
|
|
_unconsumed_tail: BYTEPTR
|
|
_unconsumed_tail_len: t.CSizeT
|
|
_unconsumed_tail_cap: t.CSizeT
|
|
input_buf: BYTEPTR
|
|
input_buf_len: t.CSizeT
|
|
input_buf_cap: t.CSizeT
|
|
def decompress(self: Decompress, data: BYTEPTR, data_len: t.CSizeT, max_length: t.CSizeT, out_len: t.CSizeT | t.CPtr) -> BYTEPTR: pass
|
|
def flush(self: Decompress, length: t.CSizeT, out_len: t.CSizeT | t.CPtr) -> BYTEPTR: pass
|
|
def copy(self: Decompress) -> Decompress | t.CPtr: pass
|
|
def delete(self: Decompress) -> t.CInt: pass
|
|
def unused_data(self: Decompress, length: t.CSizeT | t.CPtr) -> BYTEPTR: pass
|
|
def unconsumed_tail(self: Decompress, length: t.CSizeT | t.CPtr) -> BYTEPTR: pass
|
|
|
|
def set_error(code: int, msg: str) -> t.CInt: pass
|
|
|
|
def clone_bytes(pool: memhub.MemManager | t.CPtr, src: BYTEPTR, length: t.CSizeT) -> BYTEPTR: pass
|
|
|
|
def append_bytes(pool: memhub.MemManager | t.CPtr, buf: BYTE | t.CPtr[t.CPtr], length: t.CSizeT | t.CPtr, cap: t.CSizeT | t.CPtr, data: BYTEPTR, data_len: t.CSizeT) -> t.CInt: pass
|
|
|
|
def shrink_to_fit(pool: memhub.MemManager | t.CPtr, buf: BYTEPTR, length: t.CSizeT) -> BYTEPTR: pass
|
|
|
|
def runtime_version() -> str: pass
|
|
|
|
def get_error() -> str: pass
|
|
|
|
def get_error_code() -> t.CInt: pass
|
|
|
|
def clear_error() -> t.CInt: pass
|
|
|
|
def compress(pool: memhub.MemManager | t.CPtr, data: BYTEPTR, data_len: t.CSizeT, level: t.CInt, wbits: t.CInt, out_len: t.CSizeT | t.CPtr) -> BYTEPTR: pass
|
|
|
|
def decompress(pool: memhub.MemManager | t.CPtr, data: BYTEPTR, data_len: t.CSizeT, wbits: t.CInt, bufsize: t.CSizeT, out_len: t.CSizeT | t.CPtr) -> BYTEPTR: pass
|
|
|
|
def compressobj(pool: memhub.MemManager | t.CPtr, level: t.CInt, method: t.CInt, wbits: t.CInt, memLevel: t.CInt, strategy: t.CInt, zdict: BYTEPTR, zdict_len: t.CSizeT) -> Compress | t.CPtr: pass
|
|
|
|
def decompressobj(pool: memhub.MemManager | t.CPtr, wbits: t.CInt, zdict: BYTEPTR, zdict_len: t.CSizeT) -> Decompress | t.CPtr: pass
|
|
|
|
def zlib_adler32(data: BYTEPTR, length: t.CSizeT, value: t.CUnsignedLong) -> t.CUnsignedLong: pass
|
|
|
|
def zlib_crc32(data: BYTEPTR, length: t.CSizeT, value: t.CUnsignedLong) -> t.CUnsignedLong: pass
|