File Exchange

image thumbnail

Example of Lempel Ziv coding

version 1.0.0.0 (1.62 KB) by Andrea Cirillo
It's a Matlab function to codify a string of chars with Lempel-Ziv compression algorithm.

3 Downloads

Updated 18 Dec 2010

View License

[dec_cod, code_bin, code_book] = lempel_ziv(alf, str)

It's a function with three output variables and two input variables.
'dec_cod' is the decimal code that codify the input string 'str'.
'code_bin' is the binary code of the string obtained from the 'dec_cod' conversion.
'code_book' is the code-book used for the Lempel-Ziv algorithm.
'alf' is the alphabet that contains the char used to create the string 'str'.
'str' is the string to codify with the algorithm.

Comments and Ratings (8)

Doruk Seker

Volkan hocam selamlar

perfect code!!

Cagri UYSAL

I used it to compress a text file, works perfectly with slight changes.

Adel Momani

I want to write a matlab code to simulate lempel ziv source coding and the code should implement both encoding and decoding processes
The input data should be a binary text with 1000000 bits generated randomly ? If any one can help

How about the decoder for Lempel Ziv?

sepehr

reallyyyyyyyyyyyyyyyyyyyyyyyyyy good one

MATLAB Release Compatibility
Created with R2008b
Compatible with any release
Platform Compatibility
Windows macOS Linux