summaryrefslogtreecommitdiff
path: root/klm/util/read_compressed.hh
diff options
context:
space:
mode:
authorPaul Baltescu <pauldb89@gmail.com>2013-02-21 14:13:55 +0000
committerPaul Baltescu <pauldb89@gmail.com>2013-02-21 14:13:55 +0000
commitbca26d953a774b8efca12f30407390b3f5eef9d0 (patch)
treefe922de5c89b1844f677d550dcc24e87edd67a55 /klm/util/read_compressed.hh
parent54a1c0e2bde259e3acc9c0a8ec8da3c7704e80ca (diff)
parent95c364f2cb002241c4a62bedb1c5ef6f1e9a7f22 (diff)
Merge branch 'master' of https://github.com/pauldb89/cdec
Diffstat (limited to 'klm/util/read_compressed.hh')
-rw-r--r--klm/util/read_compressed.hh7
1 files changed, 7 insertions, 0 deletions
diff --git a/klm/util/read_compressed.hh b/klm/util/read_compressed.hh
index 83ca9fb2..8b54c9e8 100644
--- a/klm/util/read_compressed.hh
+++ b/klm/util/read_compressed.hh
@@ -45,6 +45,10 @@ class ReadCompressed {
// Takes ownership of fd.
explicit ReadCompressed(int fd);
+ // Try to avoid using this. Use the fd instead.
+ // There is no decompression support for istreams.
+ explicit ReadCompressed(std::istream &in);
+
// Must call Reset later.
ReadCompressed();
@@ -53,6 +57,9 @@ class ReadCompressed {
// Takes ownership of fd.
void Reset(int fd);
+ // Same advice as the constructor.
+ void Reset(std::istream &in);
+
std::size_t Read(void *to, std::size_t amount);
uint64_t RawAmount() const { return raw_amount_; }