NAME

Compress::Snappy - Perl interface to Google's Snappy (de)compressor

SYNOPSIS

use Compress::Snappy;

my $dest = compress($source);
my $dest = decompress($source);

DESCRIPTION

The Compress::Snappy module provides an interface to Google's Snappy (de)compressor.

Snappy does not aim for maximum compression, or compatibility with any other compression library; instead, it aims for very high speeds and reasonable compression. For instance, compared to the fastest mode of zlib, Snappy is an order of magnitude faster for most inputs, but the resulting compressed files are anywhere from 20% to 100% bigger.

FUNCTIONS

compress

$string = compress($buffer)

Compresses the given buffer and returns the resulting string. The input buffer can be either a scalar or a scalar reference.

decompress

uncompress

$string = decompress($buffer)

Decompresses the given buffer and returns the resulting string. The input buffer can be either a scalar or a scalar reference.

On error (in case of corrupted data) undef is returned.

SEE ALSO

http://code.google.com/p/snappy/

https://github.com/zeevt/csnappy

REQUESTS AND BUGS

Please report any bugs or feature requests to http://rt.cpan.org/Public/Bug/Report.html?Queue=Compress-Snappy. 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 Compress::Snappy

You can also look for information at:

COPYRIGHT AND LICENSE

Copyright (C) 2011 gray <gray at cpan.org>, all rights reserved.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

AUTHOR

gray, <gray at cpan.org>