X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=lib%2FIO%2FCompress%2FBrotli.pm;h=ed206a9148bc4cd7b170f843475620174e93ada6;hb=f108816bf7a6803c81d055b35b076b116506e6f0;hp=0e1d7655dd4b0242900b51c2b1c1ed94de6acd60;hpb=55f6d186428d5544b959ada5dd52f3f0c604c110;p=io-compress-brotli.git diff --git a/lib/IO/Compress/Brotli.pm b/lib/IO/Compress/Brotli.pm index 0e1d765..ed206a9 100644 --- a/lib/IO/Compress/Brotli.pm +++ b/lib/IO/Compress/Brotli.pm @@ -5,18 +5,20 @@ use strict; use warnings; use parent qw/Exporter/; +use Carp qw/croak/; + use IO::Uncompress::Brotli; our @EXPORT = qw/bro/; our @EXPORT_OK = @EXPORT; -our $VERSION = '0.001001'; +our $VERSION = '0.004001'; my %BROTLI_ENCODER_MODE = ( generic => 0, text => 1, font => 2 ); sub mode { my ($self, $mode) = @_; - die "Invalid encoder mode" + croak 'Invalid encoder mode' unless $BROTLI_ENCODER_MODE{$mode}; _mode($$self, $mode) @@ -63,10 +65,12 @@ function. =over -=item B(I<$input>) +=item B(I<$input>, I<$quality>, I<$window>) Takes a whole uncompressed buffer as input and returns the compressed -data. +data using the supplied quality and window parameters. If quality and +window parameters are not supplied, default values are used (as +described under the object-oriented interface). Exported by default. @@ -132,9 +136,24 @@ Brotli source code: L Marius Gavrilescu, Emarius@ieval.roE +The encoder bindings, modernisation of the decoder bindings and a +clean up of the overall project were contributed by: + +=over + +=item Quim Rovira, Equim@rovira.catE + +=item Ævar Arnfjörð Bjarmason, Eavarab@gmail.comE + +=item Marcell Szathmári + +=item Mattia Barbon, Emattia@barbon.orgE + +=back + =head1 COPYRIGHT AND LICENSE -Copyright (C) 2015 by Marius Gavrilescu +Copyright (C) 2015-2018 by Marius Gavrilescu This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.20.2 or,