CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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)
7  : strm_(&strm)
8  {
9  strm_->bzalloc = 0;
10  strm_->bzfree = 0;
11  strm_->opaque = 0;
12  strm_->avail_in = 0;
13  strm_->next_in = 0;
14  assert(BZ2_bzDecompressInit(strm_, 0, 0) == BZ_OK);
15  }
16 
17  BZ2InflateHandle::~BZ2InflateHandle()
18  {
19  assert(BZ2_bzDecompressEnd(strm_) == BZ_OK);
20  }
21 
22  BZ2DeflateHandle::BZ2DeflateHandle(bz_stream& strm)
23  : strm_(&strm)
24  {
25  strm_->bzalloc = 0;
26  strm_->bzfree = 0;
27  strm_->opaque = 0;
28  strm_->avail_in = 0;
29  strm_->next_in = 0;
30  assert(BZ2_bzCompressInit(strm_, 9, 0, 0) == BZ_OK);
31  }
32 
33  BZ2DeflateHandle::~BZ2DeflateHandle()
34  {
35  assert(BZ2_bzCompressEnd(strm_) == BZ_OK);
36  }
37 }