summaryrefslogtreecommitdiff
path: root/klm/util/read_compressed.hh
diff options
context:
space:
mode:
authorPatrick Simianer <simianer@cl.uni-heidelberg.de>2013-02-18 18:31:23 +0100
committerPatrick Simianer <simianer@cl.uni-heidelberg.de>2013-02-18 18:31:23 +0100
commit7deec52e8feb1c908a91224f308e8cbd9a170576 (patch)
treec8fb09523f5fef8873bd921da000d42ad5e59b6f /klm/util/read_compressed.hh
parentb89fd90083b22e6d4ab469af001a1f15fbcd7da9 (diff)
parentc17d9c23d023a5c08656376944f636180f0a437b (diff)
Merge remote-tracking branch 'upstream/master'
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_; }