Re: LZW Compression algorithm




"Z.K." <nospam@xxxxxxxxxx> wrote in message
news:rPObg.2639$p13.1854@xxxxxxxxxxx
I am trying to create a simple compression algorithm using the LZW system
based on the 128 ascii character set and I can find a lot of information on
the general description of it, but how exactly does the dictionary that is
used work. Is it just stored in an array or do you need to write it to a
file so that it can be used the next time you need to decompress a file. I
would think it would need to be stored in a file and then read into an
array since if you compressed the file and then shut down the program,
would you not lose everything in the dictionary and then not be able to
decompress the file? Any help would be appreciated.


the dictionary is created as a side effect of the algorithm, thus if
implemented sanely, one does not need to store the dictionary, as it is
recreated again during decompression...


note that if you are looking for a simple compressor that does fairly well,
it may be more useful to look into lz77 or markov prediction or similar.

Thanks,

Z.K.


.



Relevant Pages

  • LZW Compression algorithm
    ... I am trying to create a simple compression algorithm using the LZW system based on the 128 ascii character set and I can find a lot of information on the general description of it, but how exactly does the dictionary that is used work. ... Is it just stored in an array or do you need to write it to a file so that it can be used the next time you need to decompress a file. ...
    (comp.compression)
  • Re: a demonstration of repeated compression
    ... one or two demonstrations for private industry. ... Doomsday compressor, vastly different from all prior compressors ... The problem isn't compressing the movie 'text' to a file that will fit ... nor is it difficult to decompress it. ...
    (comp.compression)
  • http/1.1 decompress
    ... I'm writing an application who 'sniffs' port 80. ... I receive a byte array with the data sent over ... So I may conclude that I'll need to decompress the data I received. ... In the beginning I received several errors about an incorrect magicnumber ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: LZW .Z Decompression?
    ... I can't imagine that this topic is new and maybe I'm looking in the ... My desire would be to read in the compressed file into a byte array. ... Pass that array to the decompress function, and be returned a new byte ... Guidance/direction would be greatly appreciated. ...
    (microsoft.public.vb.general.discussion)
  • Re: OT: Why are .zip files so much bigger than tar.gz files?
    ... easy to extract indivdual files later. ... (recursive tar). ... to the offset that preceeds that file by *two* blocks, decompress the ... The nice thing is that flushing the compressor leaves the output as a ...
    (comp.lang.ruby)