A read-only IO object to decompress data in the DEFLATE format.
Instances of this class wrap another IO object. When you read from this instance
instance, it reads data from the underlying IO, decompresses it, and returns
it to the caller.
Constructors
new(io :
IO, sync_close :
Bool = false, dict :
Bytes |
Nil = nil)
Creates an instance of Flate::Reader.
SourceClass methods
open(io :
IO, sync_close :
Bool = false, dict :
Bytes |
Nil = nil, &)
Creates a new reader from the given io, yields it to the given block,
and closes it at its end.
SourceInstance methods
closed?
Returns true if this reader is closed.
Sourcedict
Dictionary passed in the constructor
SourceAppends a String representation of this object
which includes its class name, its object address
and the values of all instance variables.
class Person
def initialize(@name : String, @age : Int32)
end
end
Person.new("John", 32).inspect # => #<Person:0x10fd31f20 @name="John", @age=32>
Sourcesync_close=(sync_close :
Bool)
If #sync_close? is true, closing this IO will close the underlying IO.
Sourcesync_close?
If #sync_close? is true, closing this IO will close the underlying IO.
Sourceunbuffered_flush
Flushes the wrapped IO.
TODO: Add return type restriction Nil
Sourceunbuffered_rewind
Rewinds the wrapped IO.
TODO: Add return type restriction Nil
Sourceunbuffered_write(slice :
Bytes) :
NoReturn Always raises IO::Error because this is a read-only IO.
Source