函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\zlib_deflate\deftree.c Create Date:2022-07-27 07:56:07
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:build_tree

函数原型:static void build_tree(deflate_state *s, tree_desc *desc)

返回类型:void

参数:

类型参数名称
deflate_state *s
tree_desc *desc
543  tree等于 the dynamic tree
544  stree等于static_tree
545  elems等于elems
547  max_code等于负1
554  heap_len等于0, lement of largest frequency 等于umber of codes used to transfer the bit lengths
556 n小于elems循环
557  如果Freq不等于0则
560  否则
561  Len等于0
570 heap_len小于2循环
571  node等于umber of codes at each bit length for an optimal tree [++(heap_len)]等于如果max_code小于2则max_code先自加否则0
572  Freq等于1
573  The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.* The same heap array is used to build all trees.[node]等于0
574  length of current block with optimal trees 自减
574  如果stree length of current block with static trees 减等于Len
577  largest code with non zero frequency 等于max_code
582 n大于等于1循环pqdownheap(s, tree, n)
587  node等于elems
588  循环
590  m等于umber of codes at each bit length for an optimal tree [SMALLEST]
592  umber of codes at each bit length for an optimal tree [--(lement of largest frequency )]等于n
593  umber of codes at each bit length for an optimal tree [--(lement of largest frequency )]等于m
596  Freq等于FreqFreq
597  The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.* The same heap array is used to build all trees.[node]等于两数取大(The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.* The same heap array is used to build all trees.[n], The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.* The same heap array is used to build all trees.[m])加1
598  Dad等于Dad等于node
606  umber of codes at each bit length for an optimal tree [SMALLEST]等于node自加
607  pqdownheap(s, tree, SMALLEST)
609 heap_len大于等于2循环
611  umber of codes at each bit length for an optimal tree [--(lement of largest frequency )]等于umber of codes at each bit length for an optimal tree [SMALLEST]
616  gen_bitlen(s, (tree_desc * )desc)
619  gen_codes((ct_data * )tree, max_code, bl_count)
调用者
名称描述
build_bl_tree
zlib_tr_flush_blockDetermine 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.