File indexing completed on 2024-04-06 11:56:20
0001 #include <cassert>
0002
0003 #include "Alignment/Geners/interface/BZ2Handle.hh"
0004
0005 namespace gs {
0006 BZ2InflateHandle::BZ2InflateHandle(bz_stream &strm) : strm_(&strm) {
0007 strm_->bzalloc = nullptr;
0008 strm_->bzfree = nullptr;
0009 strm_->opaque = nullptr;
0010 strm_->avail_in = 0;
0011 strm_->next_in = nullptr;
0012 assert(BZ2_bzDecompressInit(strm_, 0, 0) == BZ_OK);
0013 }
0014
0015 BZ2InflateHandle::~BZ2InflateHandle() { assert(BZ2_bzDecompressEnd(strm_) == BZ_OK); }
0016
0017 BZ2DeflateHandle::BZ2DeflateHandle(bz_stream &strm) : strm_(&strm) {
0018 strm_->bzalloc = nullptr;
0019 strm_->bzfree = nullptr;
0020 strm_->opaque = nullptr;
0021 strm_->avail_in = 0;
0022 strm_->next_in = nullptr;
0023 assert(BZ2_bzCompressInit(strm_, 9, 0, 0) == BZ_OK);
0024 }
0025
0026 BZ2DeflateHandle::~BZ2DeflateHandle() { assert(BZ2_bzCompressEnd(strm_) == BZ_OK); }
0027 }