Huffman table in JSON format to C<$saved>.
This was added in version 0.04.
=head2 load
my $n = Compress::Huffman->new ();
$n->load ($saved);
Load a Huffman table in JSON format from C<$sa
stems are two
forms of encoding designed to overcome this issue.
=head1 DEPENDENCIES
L<JSON::Parse> and L<JSON::Create> are used by L</save> and L</load>
for storing the Huffman table. The module al
p;
use Scalar::Util 'looks_like_number';
use POSIX qw/ceil/;
use JSON::Create '0.22', 'create_json';
use JSON::Parse '0.42', 'parse_json';
our $VERSION = '0.08';
# eps is the allowed floating point e
n \@output;
}
sub save
{
my ($o) = @_;
return create_json ($o);
}
sub load
{
my ($o, $data) = @_;
my $input = parse_json ($data);
for my $k (keys %$input) {
$o->{$k} = $input->{