diff options
author | Patrick Simianer <simianer@cl.uni-heidelberg.de> | 2013-03-03 12:06:43 +0100 |
---|---|---|
committer | Patrick Simianer <simianer@cl.uni-heidelberg.de> | 2013-03-03 12:06:43 +0100 |
commit | 6b172ef1b1651e6ccf016b26c9ea94fad6df3152 (patch) | |
tree | a62dffda9143a619531be9f96912938659d3a890 /klm/util/read_compressed.hh | |
parent | 349ee7d5599bb973506c8bbb56926cf9d366b564 (diff) | |
parent | 7deec52e8feb1c908a91224f308e8cbd9a170576 (diff) |
Merge branch 'master' of github.com:pks/cdec-dtrain
Diffstat (limited to 'klm/util/read_compressed.hh')
-rw-r--r-- | klm/util/read_compressed.hh | 7 |
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_; } |