File Coverage

blib/lib/Compress/Zopfli/GZIP.pm
Criterion Covered Total %
statement 10 12 83.3
branch n/a
condition n/a
subroutine 4 4 100.0
pod n/a
total 14 16 87.5


line stmt bran cond sub pod time code
1             # Copyright (c) 2017 Marcel Greter.
2             #
3             # Permission is hereby granted, free of charge, to any person obtaining a copy
4             # of this software and associated documentation files (the "Software"), to deal
5             # in the Software without restriction, including without limitation the rights
6             # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7             # copies of the Software, and to permit persons to whom the Software is
8             # furnished to do so, subject to the following conditions:
9             #
10             # The above copyright notice and this permission notice shall be included in
11             # all copies or substantial portions of the Software.
12             #
13             # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14             # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15             # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16             # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17             # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18             # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19             # THE SOFTWARE.
20              
21             package Compress::Zopfli::GZIP;
22              
23             our $VERSION = "0.0.1";
24              
25 1     1   14071 use strict;
  1         2  
  1         26  
26 1     1   4 use warnings;
  1         2  
  1         24  
27 1     1   4 use Carp;
  1         2  
  1         90  
28              
29             require Exporter;
30              
31             our @ISA = qw(Exporter);
32              
33             our @EXPORT = qw(
34             compress
35             );
36              
37 0           use Compress::Zopfli qw(
38             ZOPFLI_FORMAT_GZIP
39 1     1   291 );
  0            
40              
41             sub compress ($;%)
42             {
43             Compress::Zopfli::compress(
44             $_[0],
45             ZOPFLI_FORMAT_GZIP,
46             $_[1] || {}
47             )
48             }
49              
50             1;
51             __END__