public
Description: Move-to-front transform encoder/decoder
Homepage:
Clone URL: git://github.com/naoya/perl-algorithm-mtf.git
naoya (author)
Sun Oct 19 07:06:19 -0700 2008
commit  58adee360d9814d2071a259ddc9814b6872eefe9
tree    7e23a75640ca1bde601389ccaece8c0bacbae073
parent  a55dcf05aa0e98257a9ccc76db5c902e62ca76cc
name age message
file Changes Loading commit data...
file MANIFEST
file Makefile.PL
file README
file bench.pl
directory inc/
directory lib/
directory t/
README
NAME
    Algorithm::MTF - Move-to-front transform encoder/decoder

SYNOPSIS
      use Algorithm::MTF;

      my $encoder = Algorithm::MTF::Encoder->new;
      my $code = $mtf->encode("aaabac"); ## $code is [ 97, 0, 0, 98, 1, 99 ]

      my $decoder = Algorithm::MTF::Decoder->new;
      say $mtf->decode([ 97, 0, 0, 98, 1, 99 ]); # "aaabac"

DESCRIPTION
    The move-to-front (or MTF) transform is an encoding of data (typically a
    stream of bytes) designed to improve the performance of entropy encoding
    techniques of compression. When efficiently implemented, it is fast
    enough that its benefits usually justify including it as an extra step
    in data compression algorithms. (quote from en.wikipedia.org)

SEE ALSO
    <http://en.wikipedia.org/wiki/Move-to-front_transform>

AUTHOR
    Naoya Ito, <naoya at bloghackers.net<gt>

COPYRIGHT AND LICENSE
    Copyright (C) 2008 by Naoya Ito

    This library is free software; you can redistribute it and/or modify it
    under the same terms as Perl itself, either Perl version 5.8.8 or, at
    your option, any later version of Perl 5 you may have available.