Page MenuHomeHEPForge

ZlibHandle.cc
No OneTemporary

ZlibHandle.cc

#include <cassert>
#include "zlib.h"
#include "geners/ZlibHandle.hh"
namespace gs {
ZlibInflateHandle::ZlibInflateHandle()
{
strm_ = new z_stream_s();
strm_->zalloc = Z_NULL;
strm_->zfree = Z_NULL;
strm_->opaque = Z_NULL;
strm_->avail_in = 0;
strm_->next_in = Z_NULL;
assert(inflateInit(strm_) == Z_OK);
}
ZlibInflateHandle::~ZlibInflateHandle()
{
inflateEnd(strm_);
delete strm_;
}
ZlibDeflateHandle::ZlibDeflateHandle(const int lev)
: level_(lev)
{
strm_ = new z_stream_s();
strm_->zalloc = Z_NULL;
strm_->zfree = Z_NULL;
strm_->opaque = Z_NULL;
strm_->avail_in = 0;
strm_->next_in = Z_NULL;
assert(deflateInit(strm_, lev) == Z_OK);
}
ZlibDeflateHandle::~ZlibDeflateHandle()
{
deflateEnd(strm_);
delete strm_;
}
}

File Metadata

Mime Type
text/x-c
Expires
Wed, May 14, 11:15 AM (17 h, 47 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5111384
Default Alt Text
ZlibHandle.cc (922 B)

Event Timeline