Home of RF and Wireless Vendors and Resources

One Stop For Your RF and Wireless Need

Text based Data Compression-Huffman,Adaptive Huffman,LZW,Arithmetic,RLE

This section of MATLAB source code covers text based data compression algorithms which include huffman,adaptive huffman,LZW,Arithmetic and RLE MATLAB code.

For basics of lossless versus lossy data compression and their types,READ MORE.

Huffman coding matlab code

Input sequence to huffman encoder:
ABCAAAACCCCAAAAACCCCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

Output sequence from huffman encoder:
ABCDABCBEB


Input sequence to huffman decoder:
ABCDABCBEB

Output sequence from huffman decoder:
ABCAAAACCCCAAAAACCCCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

Run Length Encoding(RLE) matlab code

Input to RLE encoder=
AAAABBCDDDDEEEZXXX

Output from RLE encoder=
ABCDEZX


Input to RLE decoder=
ABCDEZX

output from RLE decoder=
AAAABBCDDDDEEEZXXX

DICTIONARY based data compression(LZW algorithm) matlab code

Input in LZW compression code=
'/WED/WE/WEE/WEB/WET'

Ascii value of following is the output from the table (output of LZW encoder), If the entry is new one ascii value is assigned and the same is entered in the table as new entry.

/W
WE
ED
D/
/WE
E/
/WEE
E/W
WEB
B/
/WET

Arithmetic coding matlab code

Input sequence to Arithmetic coding:
ABCAAAACCCCAAAAACCCCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

Output from Arithmetic encoder:
ABCDABCBEB


Input to Arithmetic decoder:
ABCDABCBEB

Output from Arithmetic decoder:
ABCAAAACCCCAAAAACCCCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

Download source codes from following link

http://www.sourcecodeonline.com/
http://www.data-compression.com/download.shtml

Useful Links to MATLAB codes

Refer following as well as links mentioned on left side panel for useful MATLAB codes.
OFDM Preamble generation  Time off estimation corr  Freq off estimation corr  channel estimation  11a WLAN channel  PN sequence generation  OFDMA Tx Rx  AES DES  carrier aggregation  CCDF  FIR Filter  IIR Filter  Low Pass FIR  Viterbi decoder  CRC8 CRC32 

RF and Wireless tutorials

WLAN  802.11ac  802.11ad  wimax  Zigbee  z-wave  GSM  LTE  UMTS  Bluetooth  UWB  IoT  satellite  Antenna  RADAR 


Share this page

Translate this page