NAME

Compress::Huffman::Binary - abstract here.

SYNOPSIS

use FindBin '$Bin';
use Compress::Huffman::Binary ':all';
my $input = 'something or another';
my $output = huffman_encode ($input);
my $roundtrip = huffman_decode ($output);
if ($input eq $roundtrip) {
    print "OK.\n";
}
else {
    print "FAIL!\n";
}

produces output

OK.

(This example is included as synopsis.pl in the distribution.)

VERSION

This documents version 0.00_01 of Compress::Huffman::Binary corresponding to git commit 26bd0577d39374a3149b927613738ad082715f7c released on Sun Sep 25 17:45:17 2016 +0900.

DESCRIPTION

XS / binary version of Compress::Huffman.

FUNCTIONS

huffman_encode

my $out = encode_huffman ($in);

huffman_decode

my $out = decode_huffman ($in);

EXPORTS

"huffman_encode" and "huffman_decode" are exported on request.

AUTHOR

Ben Bullock, <bkb@cpan.org>

Request

If you'd like to see this module continued, let me know that you're using it. For example, send an email, write a bug report, star the project's github repository, add a patch, add a ++ on Metacpan.org, or write a rating at CPAN ratings. It really does make a difference. Thanks.

COPYRIGHT & LICENCE

This package and associated files are copyright (C) 2016 Ben Bullock.

You can use, copy, modify and redistribute this package and associated files under the Perl Artistic Licence or the GNU General Public Licence.

This module is based on https://github.com/drichardson/huffman by Doug Richardson. The licence for that software is as follows:

Copyright (c) 2007, Douglas Ryan Richardson, Gauss Interprise, Inc

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright
  notice, this list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright
  notice, this list of conditions and the following disclaimer in the
  documentation and/or other materials provided with the
  distribution.

* Neither the name of Gauss Interprise, Inc nor the names of its
  contributors may be used to endorse or promote products derived
  from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.