函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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
注解内核,赢得工具下载SCCTEnglish

函数名称: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 *bufput block, or NULL if too old
ulgstored_lenlength of input block
inteofrue 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_UNKNOWNset_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_lenbopt_lenb等于static_lenb
899  否则
901  opt_lenb等于static_lenb等于length of input block 加5
926  如果length of input block 加4小于等于opt_lenbput block, or NULL if too old 不等于0则
935  Send a stored block
940  否则如果static_lenb恒等于opt_lenb
943  compress_block(s, (ct_data * )Local data. These are initialized only once., (ct_data * )The static literal tree. Since the bit lengths are imposed, there is no* need for the L_CODES extra codes used during heap construction. However* The codes 286 and 287 are needed to build a canonical tree (see zlib_tr_init* below).)
944  al bit length of compressed file 加等于3加 length of current block with static trees
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)
950  al bit length of compressed file 加等于3加 length of current block with optimal trees
953  init_block(s)
962  返回:al bit length of compressed file 右移3位