blib/lib/PDF/Make/Filter.pm

filter: Statementstmt 100% 32 / 32 Branchbran n/a Conditioncond 65.6% 21 / 32 MC/DCmcdc 31.2% 5 / 16 Subroutinesub 100% 19 / 19 Podpod 87.5% 14 / 16 totaltotal 79.1% 91 / 115 CC 17 SCAR 11.6
CC
17
Cov
83%
predictor_encode
5.2
predictor_decode
5.2
tiff_predictor_encode
4.8
CRAP 3.2
« blib/lib/PDF/Make/Font.pm ↑ Summary blib/lib/PDF/Make/Extract/Result.pm »
1 package PDF::Make::Filter;
2  
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 2 ▶use PDF::Make ();
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 2 our $VERSION = '0.15';
8  
9 # Thin wrappers around the PDF::Make XS codec functions defined in xs/filter.xs.
10 # These let Perl tests exercise the ASCII85, ASCIIHex, Flate, Raw DEFLATE, LZW,
11 # RunLength and PNG/TIFF predictor implementations directly instead of only
12 # through the end-to-end writer/reader pipelines.
13  
14 12 ▶sub ascii85_encode { PDF::Make::Filter::_ascii85_encode($_[0]) }
Subroutine ascii85_encode: called CC=1 SCAR=0.0
Pod documented
15 15 ▶sub ascii85_decode { PDF::Make::Filter::_ascii85_decode($_[0]) }
Subroutine ascii85_decode: called CC=1 SCAR=0.0
Pod documented
16 3 ▶sub asciihex_encode { PDF::Make::Filter::_asciihex_encode($_[0]) }
Subroutine asciihex_encode: called CC=1 SCAR=0.0
Pod documented
17 8 ▶sub asciihex_decode { PDF::Make::Filter::_asciihex_decode($_[0]) }
Subroutine asciihex_decode: called CC=1 SCAR=0.0
Pod documented
18  
19 6 ▶sub rle_encode { PDF::Make::Filter::_rle_encode($_[0]) }
Subroutine rle_encode: called CC=1 SCAR=0.0
Pod undocumented
20 13 ▶sub rle_decode { PDF::Make::Filter::_rle_decode($_[0]) }
Subroutine rle_decode: called CC=1 SCAR=0.0
Pod undocumented
21  
22 8 ▶sub flate_encode { PDF::Make::Filter::_flate_encode($_[0]) }
Subroutine flate_encode: called CC=1 SCAR=0.0
Pod documented
23 8 ▶sub flate_decode { PDF::Make::Filter::_flate_decode($_[0]) }
Subroutine flate_decode: called CC=1 SCAR=0.0
Pod documented
24  
25 5 ▶sub deflate_encode { PDF::Make::Filter::_deflate_encode($_[0], $_[1] // 6) }
Subroutine deflate_encode: called CC=2 SCAR=7.6
Pod documented
Condition50%1/2
$_[1] // 6
l!l
50
MC/DC0%0/1
$_[1] // 6
$_[1]
Truth table50%1/2
A
A= $_[1]
Aresult
11
00
26 5 ▶sub deflate_decode { PDF::Make::Filter::_deflate_decode($_[0]) }
Subroutine deflate_decode: called CC=1 SCAR=0.0
Pod documented
27  
28 4 ▶sub adler32 { PDF::Make::Filter::_adler32($_[0]) }
Subroutine adler32: called CC=1 SCAR=0.0
Pod documented
29  
30 4 ▶sub lzw_decode {
Subroutine lzw_decode: called CC=2 SCAR=6.9
Pod documented
31 4 my ($data, %opts) = @_;
32 4 ▶ PDF::Make::Filter::_lzw_decode($data, $opts{early_change} // 1);
Condition100%2/2
$opts{"early_change"} // 1
l!l
13
MC/DC100%1/1
$opts{"early_change"} // 1
$opts{"early_change"}
Truth table100%2/2
A
A= $opts{"early_change"}
Aresult
11
00
33 }
34  
35 7 ▶sub predictor_encode {
Subroutine predictor_encode: called CC=5 SCAR=16.5
Pod documented
36 7 my %opt = @_;
37 PDF::Make::Filter::_predictor_encode(
38 $opt{predictor} // 10,
39 $opt{colors} // 1,
40 $opt{bits} // 8,
41 $opt{columns} // 1,
42 $opt{data},
43 7 ▶ );
Condition75%6/8
$opt{"predictor"} // 10
l!l
70
$opt{"colors"} // 1
l!l
61
$opt{"bits"} // 8
l!l
61
$opt{"columns"} // 1
l!l
70
MC/DC0%0/1
$opt{"predictor"} // 10
$opt{"predictor"}
MC/DC100%1/1
$opt{"colors"} // 1
$opt{"colors"}
MC/DC100%1/1
$opt{"bits"} // 8
$opt{"bits"}
MC/DC0%0/1
$opt{"columns"} // 1
$opt{"columns"}
Truth table50%1/2
A
A= $opt{"predictor"}
Aresult
11
00
Truth table100%2/2
A
A= $opt{"colors"}
Aresult
11
00
Truth table100%2/2
A
A= $opt{"bits"}
Aresult
11
00
Truth table50%1/2
A
A= $opt{"columns"}
Aresult
11
00
44 }
45  
46 7 ▶sub predictor_decode {
Subroutine predictor_decode: called CC=5 SCAR=16.5
Pod documented
47 7 my %opt = @_;
48 PDF::Make::Filter::_predictor_decode(
49 $opt{predictor} // 10,
50 $opt{colors} // 1,
51 $opt{bits} // 8,
52 $opt{columns} // 1,
53 $opt{data},
54 7 ▶ );
Condition75%6/8
$opt{"predictor"} // 10
l!l
70
$opt{"colors"} // 1
l!l
61
$opt{"bits"} // 8
l!l
61
$opt{"columns"} // 1
l!l
70
MC/DC0%0/1
$opt{"predictor"} // 10
$opt{"predictor"}
MC/DC100%1/1
$opt{"colors"} // 1
$opt{"colors"}
MC/DC100%1/1
$opt{"bits"} // 8
$opt{"bits"}
MC/DC0%0/1
$opt{"columns"} // 1
$opt{"columns"}
Truth table50%1/2
A
A= $opt{"predictor"}
Aresult
11
00
Truth table100%2/2
A
A= $opt{"colors"}
Aresult
11
00
Truth table100%2/2
A
A= $opt{"bits"}
Aresult
11
00
Truth table50%1/2
A
A= $opt{"columns"}
Aresult
11
00
55 }
56  
57 1 ▶sub tiff_predictor_encode {
Subroutine tiff_predictor_encode: called CC=4 SCAR=15.8
Pod documented
58 1 my %opt = @_;
59 PDF::Make::Filter::_tiff_predictor_encode(
60 $opt{colors} // 1, $opt{bits} // 8, $opt{columns} // 1, $opt{data},
61 1 ▶ );
Condition50%3/6
$opt{"colors"} // 1
l!l
10
$opt{"bits"} // 8
l!l
10
$opt{"columns"} // 1
l!l
10
MC/DC0%0/1
$opt{"colors"} // 1
$opt{"colors"}
MC/DC0%0/1
$opt{"bits"} // 8
$opt{"bits"}
MC/DC0%0/1
$opt{"columns"} // 1
$opt{"columns"}
Truth table50%1/2
A
A= $opt{"colors"}
Aresult
11
00
Truth table50%1/2
A
A= $opt{"bits"}
Aresult
11
00
Truth table50%1/2
A
A= $opt{"columns"}
Aresult
11
00
62 }
63  
64 1 ▶sub tiff_predictor_decode {
Subroutine tiff_predictor_decode: called CC=4 SCAR=15.8
Pod documented
65 1 my %opt = @_;
66 PDF::Make::Filter::_tiff_predictor_decode(
67 $opt{colors} // 1, $opt{bits} // 8, $opt{columns} // 1, $opt{data},
68 1 ▶ );
Condition50%3/6
$opt{"colors"} // 1
l!l
10
$opt{"bits"} // 8
l!l
10
$opt{"columns"} // 1
l!l
10
MC/DC0%0/1
$opt{"colors"} // 1
$opt{"colors"}
MC/DC0%0/1
$opt{"bits"} // 8
$opt{"bits"}
MC/DC0%0/1
$opt{"columns"} // 1
$opt{"columns"}
Truth table50%1/2
A
A= $opt{"colors"}
Aresult
11
00
Truth table50%1/2
A
A= $opt{"bits"}
Aresult
11
00
Truth table50%1/2
A
A= $opt{"columns"}
Aresult
11
00
69 }
70  
71 2 1;
72  
73 __END__
« blib/lib/PDF/Make/Font.pm ↑ Summary blib/lib/PDF/Make/Extract/Result.pm »