1IO::Uncompress::Brotli(U3s)er Contributed Perl DocumentatIiOo:n:Uncompress::Brotli(3)
2
3
4

NAME

6       IO::Uncompress::Brotli - Read Brotli buffers/streams
7

SYNOPSIS

9         use IO::Uncompress::Brotli;
10
11         # uncompress a buffer (yielding at most 10MB)
12         my $decoded = unbro $encoded, 10_000_000;
13
14         # uncompress a stream
15         my $bro = IO::Uncompress::Brotli->create;
16         while(have_input()) {
17            my $block = get_input_block();
18            my $decoded_block = $bro->decompress($block);
19            handle_output_block($decoded_block);
20         }
21

DESCRIPTION

23       IO::Uncompress::Brotli is a module that decompresses Brotli buffers and
24       streams. Despite its name, it is not a subclass of IO::Uncompress::Base
25       and does not implement its interface. This will be rectified in a
26       future release.
27
28   One-shot interface
29       If you have the whole buffer in a Perl scalar use the unbro function.
30
31       unbro($input, $maximum_decoded_size)
32           Takes a whole compressed buffer as input and returns the
33           decompressed data. It allocates a buffer of size
34           $maximum_decoded_size to store the decompressed data, if this is
35           not sufficient (or there is another error) this function will
36           croak.
37
38           Exported by default.
39
40   Streaming interface
41       If you want to process the data in blocks use the object oriented
42       interface. The available methods are:
43
44       IO::Uncompress::Brotli->create
45           Returns a IO::Uncompress::Brotli instance. Please note that a
46           single instance cannot be used to decompress multiple streams.
47
48       $bro->decompress($block)
49           Takes the a block of compressed data and returns a block of
50           uncompressed data. Dies on error.
51

SEE ALSO

53       Brotli Compressed Data Format Internet-Draft:
54       <https://www.ietf.org/id/draft-alakuijala-brotli-08.txt>
55
56       Brotli source code: <https://github.com/google/brotli/>
57

AUTHOR

59       Marius Gavrilescu, <marius@ieval.ro>
60
61       The encoder bindings, modernisation of the decoder bindings and a clean
62       up of the overall project were contributed by:
63
64       Quim Rovira, <quim@rovira.cat>
65       Ævar Arnfjörð Bjarmason, <avarab@gmail.com>
66       Marcell Szathmári
67       Mattia Barbon, <mattia@barbon.org>
68
70       Copyright (C) 2015-2018 by Marius Gavrilescu
71
72       This library is free software; you can redistribute it and/or modify it
73       under the same terms as Perl itself, either Perl version 5.20.2 or, at
74       your option, any later version of Perl 5 you may have available.
75
76
77
78perl v5.36.0                      2022-08-16         IO::Uncompress::Brotli(3)
Impressum