class Compress::Snappy::Reader

Included Modules

Defined in:

snappy/reader.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(io : IO, verify_checksums : Bool = true, sync_close : Bool = false) #

Creates a new reader from the given io.


[View source]
def self.new(filename : String, verify_checksums = true) #

Creates a new reader from the given filename.


[View source]

Class Method Detail

def self.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.


[View source]
def self.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.


[View source]

Instance Method Detail

def closed? : Bool #

Returns true if this reader is closed.


[View source]
def reset(io) #

[View source]
def sync_close=(sync_close : Bool) #

Whether to close the enclosed IO when closing this reader.


[View source]
def sync_close? : Bool #

Whether to close the enclosed IO when closing this reader.


[View source]
def unbuffered_close #

Closes this reader.


[View source]
def unbuffered_flush #
Description copied from module IO::Buffered

Flushes the wrapped IO.


[View source]
def unbuffered_read(slice : Bytes) #
Description copied from module IO::Buffered

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


[View source]
def unbuffered_rewind #
Description copied from module IO::Buffered

Rewinds the wrapped IO.


[View source]
def unbuffered_write(slice : Bytes) : Nil #

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


[View source]