forked from gitpan/Algorithm-Huffman
Read-only release history for Algorithm-Huffman
jgamble/Algorithm-Huffman
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Algorithm/Huffman version 0.09 ============================== SYNOPSIS use Algorithm::Huffman; my %char_counting = map {$_ => int rand(100)} ('a' .. 'z', 'A' .. 'Z'); # or better the real counting for your characters # as the huffman algorithm doesn't work good with random data :-)) my $huff = Algorithm::Huffman->new(\%char_counting); my $encode_hash = $huff->encode_hash; my $decode_hash = $huff->decode_hash; my $encode_of_hello = $huff->encode_bitstring("Hello"); print "Look at the encoding bitstring of 'Hello': $encode_of_hello\n"; print "The decoding of $encode_of_hello is '", $huff->decode_bitstring($encode_of_hello), "'"; INSTALLATION To install this module type the following: perl Makefile.PL make make test make install DEPENDENCIES This module requires these other modules and libraries: Heap Heap::Fibonacci Heap::Elem Tree::DAG_Node List::Util Carp # Modules only for the test script Test::More Test::ManyParams Test::Exception Data::Dumper String::Random COPYRIGHT AND LICENCE Put the correct copyright and licence information here. Copyright (C) 2002 Janek Schleicher This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
About
Read-only release history for Algorithm-Huffman
Resources
Stars
Watchers
Forks
Packages 0
No packages published
Languages
- Perl 97.7%
- Other 2.3%