Update brotli to v0.6.0
[io-compress-brotli.git] / lib / IO / Uncompress / Brotli.pm
index 674f44aac5443019d26c02df8e27ece045081fb2..75798a2703ed5a178d3a66b3518813ec8e939caa 100644 (file)
@@ -26,8 +26,8 @@ IO::Uncompress::Brotli - Read Brotli buffers/streams
 
   use IO::Uncompress::Brotli;
 
-  # uncompress a buffer
-  my $decoded = unbro $encoded;
+  # uncompress a buffer (yielding at most 10MB)
+  my $decoded = unbro $encoded, 10_000_000;
 
   # uncompress a stream
   my $bro = IO::Uncompress::Brotli->create;
@@ -51,13 +51,12 @@ function.
 
 =over
 
-=item B<unbro>(I<$input>)
+=item B<unbro>(I<$input>, I<$maximum_decoded_size>)
 
 Takes a whole compressed buffer as input and returns the decompressed
-data. This function relies on the BrotliDecompressedSize function. In
-other words, it only works if the buffer has a single meta block or
-two meta-blocks where the first is uncompressed and the second is
-empty.
+data. It allocates a buffer of size I<$maximum_decoded_size> to store
+the decompressed data, if this is not sufficient (or there is another
+error) this function will croak.
 
 Exported by default.
 
This page took 0.010187 seconds and 4 git commands to generate.