NAME
Gzip::Zopfli - Zopfli deflate/gzip compression library
SYNOPSIS
use Gzip::Zopfli 'ZopfliCompress';
my $in = 'something' x 1000;
my $out = ZopfliCompress ($in);
print length ($out), ' ', length ($in), "\n";
produces output
62 9000
(This example is included as synopsis.pl in the distribution.)
VERSION
This documents version 0.00_02 of Gzip-Zopfli corresponding to git commit 8ba7d65e9735ce72a6b0f976e315f62a948280e2 released on Fri Feb 26 12:15:50 2021 +0900.
This distribution also contains the source code of the Zopfli library version 1.0.3. See "COPYRIGHT & LICENCE" for the conditions under which this source code may be used (Apache Licence, copyright by Google Inc.)
DESCRIPTION
This module offers access to the Zopfli compression library from Perl.
FUNCTIONS
ZopfliCompress
my $out = ZopfliCompress ($in, %options);
This currently supports Gzip format compression only.
Options are as follows:
- blocksplitting
-
my $out = ZopfliCompress ($in, blocksplitting => 0);
Boolean. Apply blocksplitting or not? Default value is true.
- blocksplittingmax
-
my $out = ZopfliCompress ($in, blocksplittingmax => 0);
Maximum number of blocks to split into. Default is 15. Set to 0 for unlimited.
- numiterations
-
my $out = ZopfliCompress ($in, numiterations => 1);
Number of iterations. Default value is 15.
- type
-
my $out = ZopfliCompress ($in, type => 'zlib');
Type of compression. Either
gzip
(the default),zlib
, ordeflate
.
SEE ALSO
About Zopfli
See https://github.com/google/zopfli
CPAN
AUTHOR
Ben Bullock, <bkb@cpan.org>
COPYRIGHT & LICENCE
This package and associated files are copyright (C) 2021 Ben Bullock.
You can use, copy, modify and redistribute this package and associated files under the Perl Artistic Licence or the GNU General Public Licence.
The underlying Zopfli library is included in this distribution. Zopfli is copyright and licensed as follows:
Copyright 2011 Google Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Author: lode.vandevenne@gmail.com (Lode Vandevenne)
Author: jyrki.alakuijala@gmail.com (Jyrki Alakuijala)