test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ZlibHandle.cc
Go to the documentation of this file.
1 #include <cassert>
2 
3 #include "zlib.h"
4 
5 #include "Alignment/Geners/interface/ZlibHandle.hh"
6 
7 namespace gs {
8  ZlibInflateHandle::ZlibInflateHandle()
9  {
10  strm_ = new z_stream_s();
11  strm_->zalloc = Z_NULL;
12  strm_->zfree = Z_NULL;
13  strm_->opaque = Z_NULL;
14  strm_->avail_in = 0;
15  strm_->next_in = Z_NULL;
16  assert(inflateInit(strm_) == Z_OK);
17  }
18 
19  ZlibInflateHandle::~ZlibInflateHandle()
20  {
21  inflateEnd(strm_);
22  delete strm_;
23  }
24 
25  ZlibDeflateHandle::ZlibDeflateHandle(const int lev)
26  : level_(lev)
27  {
28  strm_ = new z_stream_s();
29  strm_->zalloc = Z_NULL;
30  strm_->zfree = Z_NULL;
31  strm_->opaque = Z_NULL;
32  strm_->avail_in = 0;
33  strm_->next_in = Z_NULL;
34  assert(deflateInit(strm_, lev) == Z_OK);
35  }
36 
37  ZlibDeflateHandle::~ZlibDeflateHandle()
38  {
39  deflateEnd(strm_);
40  delete strm_;
41  }
42 }
assert(m_qm.get())