Click here to Skip to main content
Licence CPOL
First Posted 13 Aug 2006
Views 64,740
Downloads 1,800
Bookmarked 9 times

LZW Compression Algorithm Implemented in Java

By | 13 Aug 2006 | Article
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)

About the Author

fahadkhowaja

Web Developer

Singapore Singapore

Member



Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
QuestionNice topic Pinmembersanya.fesak19:01 21 Sep '11  
Generallzw in matlab Pinmemberhana.rahmati22:14 30 Apr '10  
Questionalgorithm for n-queen Pinmemberhana.rahmati21:38 30 Apr '10  
GeneralI download your souce code and I have J creator and net beams install how do I run this file to test it PinmemberBulitpruf7:53 7 Aug '09  
GeneralRe: I download your souce code and I have J creator and net beams install how do I run this file to test it Pinmembermitesh355517:15 19 Jan '10  
Generalhelp me to implementing the "dynamic markov compression of C version" to Java (JSDK) and J2me version.. :( Pinmemberbytescode1:39 28 Apr '09  
QuestionCan you also provide the decompression method Pinmemberpakhtoon12:43 18 Nov '07  
AnswerRe: Can you also provide the decompression method Pinmembermanishaswati3:26 30 Aug '08  
AnswerRe: Can you also provide the decompression method Pinmemberduraigowardhan5:05 1 Oct '09  
QuestionRe: Can you also provide the decompression method Pinmemberskumarmails22:47 17 Jan '10  
AnswerRe: Can you also provide the decompression method Pinmemberguyver.nihilith5:24 14 Feb '10  
QuestionTABLE_SIZE PinmemberGordonMorgan5:55 4 May '07  
Generalurgent Pinmembersimarjeet5:47 26 Apr '07  
GeneralRe: urgent PinmemberKusmadi Cakep20:35 8 Jan '10  
GeneralJ2ME for LZW Pinmemberfur1284:32 20 Mar '07  
GeneralRe: J2ME for LZW Pinmembered welch7:47 3 Jun '07  
GeneralLZW in VC++ Pinmembermannur4:27 28 Feb '07  
Generalrequest Pinmemberrancidbondut8:03 19 Feb '07  
GeneralRe: LZW for J2ME Pinmemberfahadkhowaja2:09 16 Feb '07  
Generallzw for j2me Pinmemberscntuan7:26 10 Sep '06  
GeneralCongratulations and to follow !!! PinmemberPipa_Soft5:41 15 Aug '06  
GeneralRe: Congratulations and to follow !!! Pinmemberpakhtoon12:47 18 Nov '07  
GeneralRe: Congratulations and to follow !!! Pinmemberskumarmails22:34 17 Jan '10  
Generallzw copyright Pinmembersnorkelman7:33 13 Aug '06  
GeneralRe: lzw copyright Pinmemberfahadkhowaja7:47 13 Aug '06  

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.

Permalink | Advertise | Privacy | Mobile
Web02 | 2.5.120517.1 | Last Updated 13 Aug 2006
Article Copyright 2006 by fahadkhowaja
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid