Smaz - compression for very small strings!
Version 1.02
use Smaz qw/all/; my $comp = smaz_compress($str); my $decomp = smaz_decompress($str);
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.
Compress a string. Expects a Str.
smaz_compress($string);
Decompress a Smaz string. Expects a Str.
smaz_decompress($string);
LNATION, <email at lnation.org>
<email at lnation.org>
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.
bug-smaz at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Smaz
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
https://rt.cpan.org/NoAuth/Bugs.html?Dist=Smaz
CPAN Ratings
https://cpanratings.perl.org/d/Smaz
Search CPAN
https://metacpan.org/release/Smaz
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.
This software is Copyright (c) 2020 by LNATION.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)
To install Smaz, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Smaz
CPAN shell
perl -MCPAN -e shell install Smaz
For more information on module installation, please visit the detailed CPAN module installation guide.