For Programmers: Free Programming Magazines  


Home > Archive > Compression > April 2006 > Re: compressing a text file









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: compressing a text file
junky_fellow@yahoo.co.in

2006-04-21, 3:55 am


Matt Mahoney wrote:
> junky_fellow@yahoo.co.in wrote:
>
> The solution is to use an "escape" symbol, which could be any character
> that rarely occurs in your text. For example, if you use "\" as your
> escape symbol, then you encode "@" as "\@" and you encode "\" as "\\".
>
> This is a form of byte-aligned LZW compression. Decompression is
> extremely fast. You can improve compression somewhat and avoid the
> need for escape symbols if you don't restrict symbols to exactly 8
> bits. The best you can do is assign codes of length lg 1/p bits, where
> lg means log base 2 and p is the probability of the string encoded by
> the symbol.
>
> Other compression methods you might investigate are (from fastest to
> slowest, and from worst to best compression) are LZ77, Burrows-Wheeler,
> PPM, and context mixing.
>


Thanx a lot to everyone for your comments/suggestions. It was indeed
useful.

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com