CodeBus
www.codebus.net
Search
Sign in
Sign up
Hot Search :
Source
embeded
web
remote control
p2p
game
More...
Location :
Home
Search - 2-3-4 tree
Main Category
SourceCode
Documents
Books
WEB Code
Develop Tools
Other resource
Search - 2-3-4 tree - List
[
3D Graphic
]
Huffman
DL : 0
迄今为止见过的最方便的huffman编码,效率很高 一个外国人写的,很具有研究价值 Constructing a Huffman Tree according to the number of times each symbol appears in the data stream: 1) Create an array of N nodes, representing N possible symbols (ranging between 0 and N-1). 2) Set the value of each node to the number of times that its symbol appears in the data stream. 3) Create a Minimum-Heap of N nodes. 4) Add every node whose value is greater than zero to the heap. 5) Extract the best two nodes in the heap. 6) Create a parent node whose children are the two extracted nodes. 7) Add the parent node to the heap. 8) Repeat the previous three steps N-1 times (until only 1 node remains in the heap). 9) Extract the last node in the heap. The array created in the first step stores the leaves of the tree, and is used in order to encode the data stream. The node extracted in the last step is in fact the root of the tree, and is used in order to decode the data stream.-So far seen the most convenient huffman coding, efficient write a foreigner, I have research value Constructing a Huffman Tree according to the number of times each symbol appears in the data stream: 1) Create an array of N nodes , representing N possible symbols (ranging between 0 and N-1) .2) Set the value of each node to the number of times that its symbol appears in the data stream.3) Create a Minimum-Heap of N nodes.4) Add every node whose value is greater than zero to the heap.5) Extract the best two nodes in the heap.6) Create a parent node whose children are the two extracted nodes.7) Add the parent node to the heap.8) Repeat the previous three steps N-1 times (until only 1 node remains in the heap) .9) Extract the last node in the heap.The array created in the first step stores the leaves of the tree, and is used in order to encode the data stream.The node extracted in the last step is in fact the root of the tree, and is used in order to decode the data stream.
Date
: 2025-12-17
Size
: 17kb
User
:
游弋人生
[
3D Graphic
]
12302
DL : 0
3其中“2.gif”是树的贴图,存储为GIF文件格式。这是因为要使树的最终效果更好;要把图像的背景设置为背景透明,GIF文件格式可以存储一些背景颜色并将其转换成透明性信息,而JPG的格式不能存储透明性信息。-3 of them " 2.gif" is a tree map, storage for the GIF file format. This is because the net effect of the tree to make better to set the background image as the background transparent, GIF file format can store some of the background color and transparency of information into, and the JPG format can not store transparency information.
Date
: 2025-12-17
Size
: 779kb
User
:
沈欢
CodeBus
is one of the largest source code repositories on the Internet!
Contact us :
1999-2046
CodeBus
All Rights Reserved.