class Compress::Snappy::Reader

Included Modules

Defined in:

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

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

Creates a new reader from the given io.


def self.new(filename : String, verify_checksums = true) #

Creates a new reader from the given filename.


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.


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.


Instance Method Detail

def closed? : Bool #

Returns true if this reader is closed.


def reset(io) #

def sync_close=(sync_close) #

Whether to close the enclosed IO when closing this reader.


def sync_close? : Bool #

Whether to close the enclosed IO when closing this reader.


def unbuffered_close #

Closes this reader.


def unbuffered_flush #
Description copied from module IO::Buffered

Flushes the wrapped IO.


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.


def unbuffered_rewind #
Description copied from module IO::Buffered

Rewinds the wrapped IO.


def unbuffered_write(slice : Bytes) : Nil #

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