Click here to Skip to main content
11,708,312 members (70,606 online)
Click here to Skip to main content

LZW Compression Algorithm Implemented in Java

, 13 Aug 2006 CPOL 98.3K 4K 10
Rate this:
Please Sign up or sign in to vote.
This article provides an implementation of the LZW compression algorithm in Java

Introduction

I recently had the opportunity to look into compression for a project. I had to implement the Lempel-Ziv-Welch (LZW) algorithm for mobile phones in J2ME but before that, I implemented it in Java for testing purposes.

I wish to thank Mark Nelson for pointing out that the Unisys patent on this algorithm has expired, so there are fewer headaches in the use of this algorithm.

Description

This implementation is actually based on the C version of the implementation by Mark Nelson at http://marknelson.us/1989/10/01/lzw-data-compression/. Please refer to this website for further details about the algorithm. The Java adaptation is designed to work for ASCII encoded text files.

History

  • 13th August, 2006: Initial post

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

fahadkhowaja
Web Developer
Singapore Singapore
No Biography provided

You may also be interested in...

Comments and Discussions

 
QuestionRe: Can you also provide the decompression method Pin
skumarmails17-Jan-10 22:47
memberskumarmails17-Jan-10 22:47 
AnswerRe: Can you also provide the decompression method Pin
guyver.nihilith14-Feb-10 5:24
memberguyver.nihilith14-Feb-10 5:24 
QuestionTABLE_SIZE Pin
GordonMorgan4-May-07 5:55
memberGordonMorgan4-May-07 5:55 
Generalurgent Pin
simarjeet26-Apr-07 5:47
membersimarjeet26-Apr-07 5:47 
GeneralRe: urgent Pin
Kusmadi Cakep8-Jan-10 20:35
memberKusmadi Cakep8-Jan-10 20:35 
GeneralJ2ME for LZW Pin
fur12820-Mar-07 4:32
memberfur12820-Mar-07 4:32 
GeneralRe: J2ME for LZW Pin
ed welch3-Jun-07 7:47
membered welch3-Jun-07 7:47 
GeneralLZW in VC++ Pin
mannur28-Feb-07 4:27
membermannur28-Feb-07 4:27 
Generalrequest Pin
rancidbondut19-Feb-07 8:03
memberrancidbondut19-Feb-07 8:03 
GeneralRe: LZW for J2ME Pin
fahadkhowaja16-Feb-07 2:09
memberfahadkhowaja16-Feb-07 2:09 
Generallzw for j2me Pin
scntuan10-Sep-06 7:26
memberscntuan10-Sep-06 7:26 
GeneralCongratulations and to follow !!! Pin
Pipa_Soft15-Aug-06 5:41
memberPipa_Soft15-Aug-06 5:41 
GeneralRe: Congratulations and to follow !!! Pin
pakhtoon18-Nov-07 12:47
memberpakhtoon18-Nov-07 12:47 
GeneralRe: Congratulations and to follow !!! Pin
skumarmails17-Jan-10 22:34
memberskumarmails17-Jan-10 22:34 
Generallzw copyright Pin
snorkelman13-Aug-06 7:33
membersnorkelman13-Aug-06 7:33 
GeneralRe: lzw copyright Pin
fahadkhowaja13-Aug-06 7:47
memberfahadkhowaja13-Aug-06 7:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.150819.1 | Last Updated 13 Aug 2006
Article Copyright 2006 by fahadkhowaja
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid