my ($source) = $test =~ s/\.compressed$//r;
$source = read_file $source;
- for my $quality (9,11) {
- my $encoded = bro($source, $quality);
- my $decoded = unbro($encoded);
+ for my $quality (9,11) {
+ my $encoded = bro($source, $quality);
+ my $decoded = unbro($encoded);
- is $decoded, $source, "$test - quality $quality";
- }
+ is $decoded, $source, "$test - quality $quality";
+ }
- for my $quality (1,5,9,11) {
+ for my $quality (1,5,9,11) {
my $enc = IO::Compress::Brotli->create;
$enc->quality($quality);
- my $encoded = $enc->compress($source);
- $encoded .= $enc->finish();
+ my $encoded = $enc->compress($source);
+ $encoded .= $enc->finish();
my $dec = IO::Uncompress::Brotli->create;
- my $decoded = $dec->decompress($encoded);
+ my $decoded = $dec->decompress($encoded);
- is $decoded, $source, "$test - streaming / quality $quality";
- }
+ is $decoded, $source, "$test - streaming / quality $quality";
+ }
}