"""
Auto-generated Python stub file from __zlib.zdeflate.py
Module: __zlib.zdeflate
"""


from stdint import *
import zchecksum
import zhuff
import zdef
import string
import t, c

@t.Object
class zdeflate_stream:
    writer: zdef.zbit_writer
    window: BYTE | t.CPtr
    window_pos: t.CInt
    window_size: t.CInt
    hash_head: t.CInt | t.CPtr
    hash_prev: t.CInt | t.CPtr
    level: t.CInt
    strategy: t.CInt
    wbits: t.CInt
    is_finished: t.CInt
    adler: t.CUInt32T
    def find_match(self: zdeflate_stream, data: BYTE | t.CPtr, data_len: t.CSizeT, pos: t.CSizeT, best_dist: t.CInt | t.CPtr) -> t.CInt: pass
    def update_hash(self: zdeflate_stream, data: BYTE | t.CPtr, pos: t.CSizeT) -> t.CInt: pass
    def write_fixed_block(self: zdeflate_stream, data: UINT8PTR, length: t.CSizeT, final: t.CInt) -> t.CInt: pass
    def encode_block_data(self: zdeflate_stream, data: UINT8PTR, length: t.CSizeT, lit_tree: zhuff.zhuff_tree | t.CPtr, dist_tree: zhuff.zhuff_tree | t.CPtr) -> t.CInt: pass
    def write_dynamic_block(self: zdeflate_stream, data: UINT8PTR, length: t.CSizeT, final: t.CInt) -> t.CInt: pass
    def compress_block(self: zdeflate_stream, data: UINT8PTR, length: t.CSizeT, final: t.CInt) -> t.CInt: pass
    def write_stored_block(self: zdeflate_stream, data: UINT8PTR, length: t.CSizeT, final: t.CInt) -> t.CInt: pass
    def compress(self: zdeflate_stream, data: UINT8PTR, length: t.CSizeT, out: t.CUInt8T | t.CPtr[t.CPtr], out_len: t.CSizeT | t.CPtr) -> t.CInt: pass
    def flush(self: zdeflate_stream, mode: t.CInt, out: t.CUInt8T | t.CPtr[t.CPtr], out_len: t.CSizeT | t.CPtr) -> t.CInt: pass
    def set_dictionary(self: zdeflate_stream, dict: UINT8PTR, length: t.CSizeT) -> t.CInt: pass
    def copy(self: zdeflate_stream) -> zdeflate_stream | t.CPtr: pass
    def destroy(self: zdeflate_stream) -> t.CInt: pass

def zdeflate_count_freqs(lit_freqs: INTPTR, dist_freqs: INTPTR, s: zdeflate_stream | t.CPtr, data: UINT8PTR, length: t.CSizeT) -> t.CInt: pass

def zdeflate_hash(p: BYTE | t.CPtr) -> t.CUnsignedInt: pass

def zdeflate_len_to_symbol(length: t.CInt) -> t.CInt: pass

def zdeflate_dist_to_symbol(dist: t.CInt) -> t.CInt: pass

def zdeflate_count_cl_freqs(all_lengths: INTPTR, total: t.CInt, cl_freqs: INTPTR) -> t.CInt: pass

def zdeflate_write_cl_encoded(all_lengths: INTPTR, total: t.CInt, w: zdef.zbit_writer | t.CPtr, cl_tree: zhuff.zhuff_tree | t.CPtr) -> t.CInt: pass

def zdeflate_create(level: t.CInt, wbits: t.CInt, mem_level: t.CInt, strategy: t.CInt) -> zdeflate_stream | t.CPtr: pass

def zdeflate_one_shot(data: UINT8PTR, length: t.CSizeT, level: t.CInt, wbits: t.CInt, out_len: t.CSizeT | t.CPtr) -> t.CUInt8T | t.CPtr: pass
