NAME

Smaz - compression for very small strings!

VERSION

Version 1.03

SYNOPSIS

use Smaz qw/all/;

my $comp = smaz_compress($str);
my $decomp = smaz_decompress($comp);

DESCRIPTION

Smaz is a simple compression library suitable for compressing very short strings. General purpose compression libraries will build the state needed for compressing data dynamically, in order to be able to compress every kind of data. This is a very good idea, but not for a specific problem: compressing small strings will not work.

Smaz instead is not good for compressing general purpose data, but can compress text by 40-50% in the average case (works better with English), and is able to perform a bit of compression for HTML and urls as well. The important point is that Smaz is able to compress even strings of two or three bytes!

For example the string "the" is compressed into a single byte.

EXPORT

smaz_compress

Compress a string. Expects a Str.

smaz_compress($string);

smaz_decompress

Decompress a Smaz string. Expects a Str.

smaz_decompress($string);

AUTHOR

LNATION, <email at lnation.org>

BUGS

Please report any bugs or feature requests to bug-smaz at rt.cpan.org, or through the web interface at https://rt.cpan.org/NoAuth/ReportBug.html?Queue=Smaz. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc Smaz

You can also look for information at:

ACKNOWLEDGEMENTS

Smaz was written by Salvatore Sanfilippo and is released under the BSD license. Check the COPYING file for more information.

See http://github.com/antirez/smaz for information on smaz and the algorithm itself.

LICENSE AND COPYRIGHT

This software is Copyright (c) 2020 by LNATION.

This is free software, licensed under:

The Artistic License 2.0 (GPL Compatible)