class

Compress::XZ::Reader

Inherits IO::Buffered / IO / Reference / Object

Constants

LZMA_CONCATENATED = 8

Constructors

new(io : IO, sync_close : Bool = false)

Creates an instance of Flate::Reader.

Source
new(filename : String)

Creates a new reader from the given filename.

Source

Class methods

open(io : IO, sync_close : Bool = false, &)

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

Source
open(io : IO, sync_close = false, &)

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

Source
open(filename : String, &)

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

Source

Instance methods

closed?

Returns true if this reader is closed.

Source
sync_close=(sync_close : Bool)

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

Source
sync_close?

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

Source
unbuffered_close

Closes this reader.

Source
unbuffered_flush

Flushes the wrapped IO.

TODO: Add return type restriction Nil

Source
unbuffered_read(slice : Bytes)

Reads at most slice.size bytes from the wrapped IO into slice. Returns the number of bytes read.

TODO: Add return type restriction Int32

Source
unbuffered_rewind

Rewinds the wrapped IO.

TODO: Add return type restriction Nil

Source
unbuffered_write(slice : Bytes)

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

Source