Files
scylladb/sstables
Nadav Har'El 4db17a454c sstables: add compressed reading to sstable.cc
This patch adds compressed_file_input_stream, which is a
"random_access_reader" subclass just like the existing file_input_stream.

Changed all the parsers to take a reference to random_access_reader (the
base class) instead of file_input_stream.

The code is now ready (sort of) for compressed-file reading, but it doesn't
actually do that: sstable::read_simple() still always uses file_input_stream
for now.

Note: despite all the layers of classes holding our input streams, we
actually pay surprisingly little cost for virtual function calls or pointer
dereferencing: random_access_reader::read_exactly is *not* a virtual function -
it always calls _in.read_exactly(). This is input_stream::read_exactly(),
which again is not a virtual function (the rarely called get() is a virtual
function is virtual, but input_stream::read_exactly() usually just reads reads
from an already available buffer.

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
2015-03-24 15:08:14 +02:00
..