Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\zlib_deflate\deftree.c Create Date:2022-07-28 06:58:46
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:build_tree

Proto:static void build_tree(deflate_state *s, tree_desc *desc)

Type:void

Parameter:

TypeParameterName
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  When n < elems cycle
557  If Freq != 0 Then
560  Else
561  Len = 0
570  When heap_len < 2 cycle
571  node = umber of codes at each bit length for an optimal tree [++(heap_len)] = If max_code < 2 Then ++max_code Else 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  If stree Then length of current block with static trees -= Len
577  largest code with non zero frequency = max_code
582  When n >= 1 cycle pqdownheap(s, tree, n)
587  node = elems
588  Do
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 = Freq + Freq
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] = max - return maximum of two values of the same or compatible types*@x: first value*@y: second value(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  When heap_len >= 2 cycle
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)
Caller
NameDescribe
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.