| 198 | }; |
| 199 | |
| 200 | Result<std::shared_ptr<CompressedOutputStream>> CompressedOutputStream::Make( |
| 201 | util::Codec* codec, const std::shared_ptr<OutputStream>& raw, MemoryPool* pool) { |
| 202 | // CAUTION: codec is not owned |
| 203 | std::shared_ptr<CompressedOutputStream> res(new CompressedOutputStream); |
| 204 | res->impl_.reset(new Impl(pool, raw)); |
| 205 | RETURN_NOT_OK(res->impl_->Init(codec)); |
| 206 | return res; |
| 207 | } |
| 208 | |
| 209 | CompressedOutputStream::~CompressedOutputStream() { internal::CloseFromDestructor(this); } |
| 210 |