CMS 3D CMS Logo

BZ2Handle.cc
Go to the documentation of this file.
1 #include <cassert>
2 
3 #include "Alignment/Geners/interface/BZ2Handle.hh"
4 
5 namespace gs {
6  BZ2InflateHandle::BZ2InflateHandle(bz_stream &strm) : strm_(&strm) {
7  strm_->bzalloc = nullptr;
8  strm_->bzfree = nullptr;
9  strm_->opaque = nullptr;
10  strm_->avail_in = 0;
11  strm_->next_in = nullptr;
12  assert(BZ2_bzDecompressInit(strm_, 0, 0) == BZ_OK);
13  }
14 
15  BZ2InflateHandle::~BZ2InflateHandle() { assert(BZ2_bzDecompressEnd(strm_) == BZ_OK); }
16 
17  BZ2DeflateHandle::BZ2DeflateHandle(bz_stream &strm) : strm_(&strm) {
18  strm_->bzalloc = nullptr;
19  strm_->bzfree = nullptr;
20  strm_->opaque = nullptr;
21  strm_->avail_in = 0;
22  strm_->next_in = nullptr;
23  assert(BZ2_bzCompressInit(strm_, 9, 0, 0) == BZ_OK);
24  }
25 
26  BZ2DeflateHandle::~BZ2DeflateHandle() { assert(BZ2_bzCompressEnd(strm_) == BZ_OK); }
27 } // namespace gs
Definition: AbsArchive.cc:45