函数逻辑报告 |
Source Code:lib\zlib_deflate\deftree.c |
Create Date:2022-07-27 07:56:14 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称: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.
函数原型:ulg zlib_tr_flush_block(deflate_state *s, char *buf, ulg stored_len, int eof)
返回类型:ulg
参数:
类型 | 参数 | 名称 |
---|---|---|
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 | 如果compression level (1..9) 大于0则 |
870 | 如果UNKNOWN, BINARY or ASCII 恒等于Z_UNKNOWN则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 | 如果static_lenb小于等于opt_lenb则opt_lenb等于static_lenb |
899 | 否则 |
901 | opt_lenb等于static_lenb等于length of input block 加5 |
926 | 如果length of input block 加4小于等于opt_lenb且put block, or NULL if too old 不等于0则 |
940 | 否则如果static_lenb恒等于opt_lenb则 |
945 | 否则 |
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) |