Function report |
Source Code:lib\zlib_deflate\deftree.c |
Create Date:2022-07-28 06:58:54 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Determine the best encoding for the current block: dynamic trees, static* trees or store, and output the encoded block to the zip file. This function* returns the total compressed length for the file so far.
Proto:ulg zlib_tr_flush_block(deflate_state *s, char *buf, ulg stored_len, int eof)
Type:ulg
Parameter:
Type | Parameter | Name |
---|---|---|
deflate_state * | s | |
char * | buf | put block, or NULL if too old |
ulg | stored_len | length of input block |
int | eof | rue if this is the last block for a file |
864 | max_blindex = 0 |
867 | If compression level (1..9) > 0 Then |
870 | If UNKNOWN, BINARY or ASCII == Z_UNKNOWN Then set_data_type(s) |
873 | build_tree(s, (tree_desc * )( & (Huffman tree for bit lengths ))) |
877 | build_tree(s, (tree_desc * )( & (desc. for distance tree ))) |
887 | max_blindex = build_bl_tree(s) |
890 | opt_lenb = length of current block with optimal trees + 3 + 7 >> 3 |
891 | static_lenb = length of current block with static trees + 3 + 7 >> 3 |
897 | If static_lenb <= opt_lenb Then opt_lenb = static_lenb |
899 | Else |
901 | opt_lenb = static_lenb = length of input block + 5 |
926 | If length of input block + 4 <= opt_lenb && put block, or NULL if too old != 0 Then |
940 | Else if static_lenb == opt_lenb Then |
945 | Else |
947 | send_all_trees(s, largest code with non zero frequency + 1, largest code with non zero frequency + 1, max_blindex + 1) |
949 | compress_block(s, (ct_data * )literal and length tree , (ct_data * )dyn_dtree) |
953 | init_block(s) |
955 | If rue if this is the last block for a file Then |
957 | al bit length of compressed file += 7 |
962 | Return al bit length of compressed file >> 3 |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |