X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=bin%2Fbro-perl;fp=bin%2Fbro-perl;h=ffad9052518d903392d222af0c47938e71715a73;hb=807f50a6c182d8c3b733e028821829c8ace89499;hp=6aac129481f9ac5dcc86ad11caaae5f314777acc;hpb=01e72b73ccd37e6f3c9080c8d98be6f18522a81b;p=io-compress-brotli.git diff --git a/bin/bro-perl b/bin/bro-perl index 6aac129..ffad905 100755 --- a/bin/bro-perl +++ b/bin/bro-perl @@ -85,17 +85,16 @@ for ( 1..$REPEAT ) { $bro->window( $WINDOW ); while( read $ifh, (my $buf), $STREAM ) { $encoded = $bro->compress($buf); - $total_size += bytes::length( $encoded ); + $total_size += bytes::length( $buf ); print $ofh $encoded; } $encoded = $bro->finish(); - $total_size += bytes::length( $encoded ); print $ofh $encoded; } else { my $decoded = read_file( $ifh ); my $encoded = bro( $decoded, $QUALITY, $WINDOW ); - $total_size += bytes::length( $encoded ); + $total_size += bytes::length( $decoded ); write_file( $ofh, $encoded ); } }