X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;ds=sidebyside;f=lib%2FIO%2FUncompress%2FBrotli.pm;h=f4b8bdb0eb6f566d2fbd9c68783eaa48a49c5b8e;hb=5f975f9cf1bea0a9bafd5c09ef9cb7ed24410eba;hp=7cf3bd65bece4e6d5ff61ca5e01963acf4f85f1e;hpb=f9995f31e58bcdfc9eb528128c6bfcbb0b8fc777;p=io-compress-brotli.git diff --git a/lib/IO/Uncompress/Brotli.pm b/lib/IO/Uncompress/Brotli.pm index 7cf3bd6..f4b8bdb 100644 --- a/lib/IO/Uncompress/Brotli.pm +++ b/lib/IO/Uncompress/Brotli.pm @@ -8,31 +8,31 @@ use parent qw/Exporter/; our @EXPORT = qw/unbro/; our @EXPORT_OK = @EXPORT; -our $VERSION = '0.001'; +our $VERSION = '0.001001'; require XSLoader; XSLoader::load('IO::Compress::Brotli', $VERSION); sub create { my ($class) = @_; - my $state = BrotliCreateState(); + my $state = BrotliDecoderCreateInstance(); bless \$state, $class } sub DESTROY { my ($self) = @_; - BrotliDestroyState($$self) + BrotliDecoderDestroyInstance($$self) } sub decompress { my ($self, $data) = @_; - BrotliDecompressStream($$self, $data) + BrotliDecoderDecompressStream($$self, $data) } # Untested, probably not working sub set_dictionary { my ($self, $dict) = @_; - BrotliSetCustomDictionary($$self, $dict) + BrotliDecoderSetCustomDictionary($$self, $dict) } 1;