Skip to content

class Compress::Deflate::Reader
inherits IO

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.

Included modules

IO::Buffered

Class methods

.gzip(input, sync_close : Bool = false

Creates an instance of Flate::Reader for the gzip format, yields it to the given block, and closes it at its end.

View source

.open(io : IO, sync_close : Bool = false, dict : Bytes? = nil

Creates a new reader from the given io, yields it to the given block, and closes it at its end.

View source

.gzip(input, sync_close : Bool = false) : self

Creates an instance of Flate::Reader for the gzip format. has written.

View source

.new(io : IO, sync_close : Bool = false, dict : Bytes? = nil)

Creates an instance of Flate::Reader.

View source

Methods

#closed? : Bool

Returns true if this reader is closed.

View source

#dict : Bytes?

Dictionary passed in the constructor

View source

#sync_close=(sync_close : Bool)

If #sync_close? is true, closing this IO will close the underlying IO.

View source

#sync_close? : Bool

If #sync_close? is true, closing this IO will close the underlying IO.

View source

#unbuffered_close

Closes this reader.

View source

#unbuffered_flush

Flushes the wrapped IO.

View source

#unbuffered_read(slice : Bytes)

See IO#read.

View source

#unbuffered_rewind

Rewinds the wrapped IO.

View source

#unbuffered_write(slice : Bytes)

Always raises IO::Error because this is a read-only IO.

View source