Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

The Huffman Tree


  • Please log in to reply
2 replies to this topic

#1 smilewithme

smilewithme

  • Members
  • 11 posts
  • OFFLINE
  •  
  • Local time:06:29 AM

Posted 08 May 2005 - 08:55 AM

I have learned the Huffman Tree.I have tried my best to build a Huffman Tree.Eventually,I make it! It costs me all the spare time of the two days.
Although I have built a Huffman Tree by myself using my own codes,I am still in a puzzle about some matters.
We can discuss about it.

BC AdBot (Login to Remove)

 


#2 raw

raw

    Bleeping Hacker


  • Members
  • 2,577 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Texas
  • Local time:06:29 AM

Posted 09 May 2005 - 01:00 PM

Looks interesting,can you give me an example of why you would write compresison code?

rawsig.png

 rawcreations.net          @raw_creations


Current systems: WHAT OS, BackTrack-raw, PCLinuxOS, Peppermint OS 6, Kali Linux

and a custom Linux From Scratch server hosting a bunch of top secret stuff.


#3 smilewithme

smilewithme
  • Topic Starter

  • Members
  • 11 posts
  • OFFLINE
  •  
  • Local time:06:29 AM

Posted 12 May 2005 - 06:44 AM

I write it to compress a file to save space.
Such as the letters in English,they appeared in a file holding different frequences.
For example,"A" appeared 77 times,"B" appeared 17 times.Some letters had little
frequency,so using this fact we can make a new file.The previous file use the ASC codes to translate the letters into binary numbers,so the letters can be store in the memory.But the new file doesn't use the ASC codes,it uses the Huffman codes to translate the letters into binary numbers,which are stored in the memory.
In ASC every letter having been translated into binary number is assigned 8 bytes.But in Huffman's theory,not all the letters are allocated 8 bytes.Some letters take more than 8 bytes,some take less than 8 bytes.It really make effects,and it can save the space.
If you are interesting in the Huffman Tree,you'd better find a book about this to read.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users