A read-only IO object to decompress data in the zlib 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 a new reader from the given io.
SourceClass methods
open(io :
IO, sync_close = false, dict :
Bytes |
Nil = nil, &)
Creates a new reader from the given io, yields it to the given block,
and closes it at the end.
SourceInstance methods
closed?
Returns true if this reader is closed.
Sourcesync_close=(sync_close :
Bool)
Whether to close the enclosed IO when closing this reader.
Sourcesync_close?
Whether to close the enclosed IO when closing this reader.
Sourceunbuffered_close
Closes the wrapped IO.
TODO: Add return type restriction Nil
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