class Compress::Snappy::Reader
- Compress::Snappy::Reader
- IO
- Reference
- Object
Included Modules
- IO::Buffered
Defined in:
Constructors
-
.new(io : IO, verify_checksums = true, sync_close = false)
Creates a new reader from the given io.
-
.new(filename : String, verify_checksums = true)
Creates a new reader from the given filename.
Class Method Summary
-
.open(io : IO, verify_checksums = true, 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, verify_checksums = true, &)
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. - #reset(io)
-
#sync_close=(sync_close)
Whether to close the enclosed
IOwhen closing this reader. -
#sync_close? : Bool
Whether to close the enclosed
IOwhen closing this reader. -
#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) : Nil
Always raises
IO::Errorbecause this is a read-onlyIO.
Constructor Detail
Creates a new reader from the given io.
Creates a new reader from the given filename.
Class Method Detail
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
Reads at most slice.size bytes from the wrapped IO into slice.
Returns the number of bytes read.