No BSD License  

Highlights from
huffman

3.25

3.2 | 8 ratings Rate this file 9 Downloads (last 30 days) File Size: 9.58 KB File ID: #228

huffman

by Karl Skretting

 

08 Feb 1998

A set of MATLAB m-files (version 5.2) which do complete Huffman Coding.

| Watch this File

File Information
Description

A set of MATLAB m-files (version 5.2) which do complete Huffman Coding.
 
 
The files are:
 
hufflen: Based on probability (or number of occurences) of each symbol the length for the Huffman codewords are calculated.
 
          ex: HL = hufflen(S);
 
 
huffcode: Based on the codeword lengths this function find the Huffman codewords
 
          ex: HK = huffcode(HL);
 
 
hufftree: Make the Huffman-tree from the length of Huffman codes
 
          ex: Htree = hufftree(HL);
 
 
huff03: Huffman encoder/decoder, one or two vectors of non-negative integers are huffman coded.
 
          ex: y = huff03(x1, x2); % encoding
          ex: [x1, x2] = huff03(y); % decoding

MATLAB release MATLAB 5.2 (R10)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (8)
05 Dec 2003 akam paul

I try it

19 Apr 2004 Afshin David

Doesn't seem to work, e.g., for a constant sequence it gives irrelevant codewords.

21 Apr 2004 George Castle

I tried using a square wave with a long period and the compression was no different than for a random sequence. There appears to be a bug that needs fixing first.

03 Mar 2005 MADHURI MADHURI

the coding process is not running correctly it fails in encoding itself help for it

25 Oct 2005 bala sundaram

its really nice

25 Dec 2006 mickey mickey

gooooooood

12 Mar 2007 Faisal Alhajri

It`s not bad. However, I think you can make it more simple and efficient. It`s too long and it needs three other function beside the orginal one, you can combine them in one function and much less lines. it's going to be then more faster in execution and less error. I have made one but still in progress. anyway, mine is much less lines than this one. You are like trying to execute 1+1 in this manner y = 1, x = 1, and z = y, s = x, then g = z + s.
Good luck man.

12 Nov 2007 milind tandel  
Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
coding theory Karl Skretting 22 Oct 2008 06:34:17
information theory Karl Skretting 22 Oct 2008 06:34:17
huffman Karl Skretting 22 Oct 2008 06:34:17
decoding Karl Skretting 22 Oct 2008 06:34:17
encoding Karl Skretting 22 Oct 2008 06:34:17
coding Karl Skretting 22 Oct 2008 06:34:17
coding Lu Xiong 20 May 2010 22:43:18

Contact us at files@mathworks.com