class Compress::XZ::Reader
- Compress::XZ::Reader
- IO
- Reference
- Object
Included Modules
- IO::Buffered
Defined in:
xz/reader.crConstant Summary
-
LZMA_CONCATENATED =
8
Constructors
-
.new(io : IO, sync_close : Bool = false)
Creates an instance of Flate::Reader.
-
.new(filename : String)
Creates a new reader from the given filename.
Class Method Summary
-
.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.
-
.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.
-
.open(filename : String, &)
Creates a new reader from the given filename, yields it to the given block, and closes it at the end.
Instance Method Summary
-
#closed? : Bool
Returns
trueif this reader is closed. -
#sync_close=(sync_close : Bool)
If
#sync_close?istrue, closing this IO will close the underlying IO. -
#sync_close? : Bool
If
#sync_close?istrue, closing this IO will close the underlying IO. -
#unbuffered_close
Closes this reader.
-
#unbuffered_flush
Flushes the wrapped
IO. -
#unbuffered_read(slice : Bytes)
Reads at most slice.size bytes from the wrapped
IOinto slice. -
#unbuffered_rewind
Rewinds the wrapped
IO. -
#unbuffered_write(slice : Bytes)
Always raises
IO::Errorbecause this is a read-onlyIO.
Constructor Detail
Class Method Detail
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 Method Detail
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.