On Mon, Apr 01, 2002 at 02:52:37PM +0100, Ian Phillipps wrote:
> There's a compression method that gives about 2:1 which is used by Psion
> text file readers. Very simple to decompress: my reader is attached, but
> it has "require 5.00557", so is somewhat ruled out.
>
> require 5.00557; # For unpack 'C/a'
> sub decomp {
> my ($prefix,@dict[0..255],$rest)= unpack ( 'A9'.('C/a' x 256).'A*', $_[0] );
> $rest =~ s/./$dict[ord $&]/sge;
> return $rest;
> }
Ooooh! I like that. 2:1 compression is pretty good. How does the
algorithm work?
> BTW, I'd be very much inclined not to use __DATA__, but to include each
> file as a perl '<<' literal.
Err... why?
--
Michael G. Schwern <[EMAIL PROTECTED]> http://www.pobox.com/~schwern/
Perl Quality Assurance <[EMAIL PROTECTED]> Kwalitee Is Job One
We don't know. But if we did, we wouldn't tell you.