A stream buffer that compresses into another stream.
More...
#include <compressedstream.h>
|
|
int_type | overflow (int_type ch=traits_type::eof()) override |
|
std::streamsize | xsputn (const char *s, std::streamsize count) override |
|
int | sync () override |
<avogadro/io/compressedstream.h>
◆ CompressingStreamBuf()
| CompressingStreamBuf |
( |
std::unique_ptr< std::ostream > | sink, |
|
|
Compression | type ) |
- Parameters
-
| sink | The stream to write compressed bytes to. Ownership is taken. |
| type | The codec to encode with, which must not be Compression::None. |
◆ finish()
Must happen before the sink is closed or the output is unreadable, so the destructor calls this too. Calling it twice is harmless.
- Returns
- True if the stream was finished cleanly.
◆ error()
| std::string error |
( |
| ) |
const |
- Returns
- The error encountered while encoding, empty if none.
The documentation for this class was generated from the following file: