Björn Höhrmann

NAME

Compress::Deflate7 - Perl interface to 7-Zip's deflate compressor

SYNOPSIS

  use Compress::Deflate7 qw(deflate7 zlib7);
  my $rfc1951 = deflate7("...");
  my $rfc1950 = zlib7("...");

  my $level9 = zlib7(
    "...",
    Algorithm => 1,
    Pass => 10,
    FastBytes => 128,
    Cycles => 0,
  );

DESCRIPTION

This modules exposes 7-Zip's deflate compressor. The implementation favours compression ratio over speed under high settings and is often able to compress better than the widely used zlib library.

EXPORTS

The functions deflate7 and zlib7 on request, none by default.

OPTIONS

Both functions allow several options to succeed the data parameter. The Algorithm option can be set to 0 or 1, the Pass option can be set to 1 through 15, FastBytes can be set to 3 through 258, and Cycles can be set to any positive integer. The -mx=9 mode in 7za sets Algorithm to 1, Pass to 10, FastBytes to 128, and Cycles to 0. The default is 0, 1, 32, 0.

SEE ALSO

http://www.7-zip.org/

AUTHOR / COPYRIGHT / LICENSE

  Copyright (c) 2011 Bjoern Hoehrmann <bjoern@hoehrmann.de>.
  This module is licensed under the same terms as 7-Zip.

  Uses code from 7-Zip Copyright (C) 1999-2010 Igor Pavlov,
  refer to `7zip/Doc` in this distribution for details.