15 class BackInsertStream {
16 std::vector<uint8_t>* buffer;
17 std::unique_ptr<VectorStreamBuffer<uint8_t>> outBuf;
18 std::unique_ptr<std::stringstream> ss;
22 BackInsertStream(
const BackInsertStream& other): BackInsertStream(*other.buffer) {
25 BackInsertStream(BackInsertStream&& other) {
26 buffer = other.buffer;
27 outBuf = std::move(other.outBuf);
28 ss = std::move(other.ss);
31 other.buffer =
nullptr;
35 BackInsertStream(std::vector<uint8_t>& buf) {
37 outBuf = std::unique_ptr<VectorStreamBuffer<uint8_t>>(
38 new VectorStreamBuffer<uint8_t>(buf));
40 ss = std::unique_ptr<std::stringstream> {
41 new std::stringstream()
47 std::ostream& stream() {
52 return buffer->size();
Contains the text compression and encoding framework.