File Exchange

image thumbnail

LZW Compression Algorithm

version (34.7 KB) by Giuseppe Ridinò
Simple LZW algorithm implementation.


Updated 13 May 2004

No License

This is a simple implementation of the famous LZW algorithm.

Cite As

Giuseppe Ridinò (2021). LZW Compression Algorithm (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (16)

tejes chavan

I want simple .m file for lzw encoding of an image compression


I have A 65kb image (Dimension 256 X 256), uncompressed in BMP format. i want to compress that image using this algorithm but the dimension changes. I want o maintain the same 256 X 256 dimension after compression. I am not sure is it possible or not. if yes, how?

sohrab nasiri


nacer edddine


Fesih KESK?N


thanks,let me understand the way of lzw compression

naidu challam

nice very good

vibhav chaurasiya


Michael Frank

Very clean code, very easy to use and understand. Recommended if you are trying to learn about compression algorithms!

Natural Decaf

Not a good implementation. The performance is so bad even for a 512x512 size of image.

Shekhar Bhatt

vinayak naik


ferhat sirka

Sumit Utreja

ginita deka

MATLAB Release Compatibility
Created with R12.1
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!