in reply to Keeping deflated data in memory

Here is an example of deflating from buffer ($data) and to a buffer. In this example $outbuffer will have the compressed data.

use IO::Comnpress::Deflate = qw(deflate); my $data = "abcde"; my $outbuffer; deflate \$data => \$outbuffer;