Compress::Brotli::Reader
Inherits IO::Buffered / IO / Reference / Object
string = File.open("file.br") do |file| Compress::Brotli::Reader.open(file) do |br| br.gets_to_end end end pp string
Constants
buffer size that avoids execessive round-trips between C and Crystal but doesn't waste too much memory on buffering. Its arbitrarily chosen to be equal to the constant used in IO::copy
Constructors
Class methods
Creates a new reader from the given io, yields it to the given block, and closes it at its end.
Creates a new reader from the given io, yields it to the given block, and closes it at the end.
Creates a new reader from the given filename, yields it to the given block, and closes it at the end.
Instance methods
If #sync_close? is true, closing this IO will close the underlying IO.
Reads at most slice.size bytes from the wrapped IO into slice.
Returns the number of bytes read.
TODO: Add return type restriction Int32