Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 11:56:20

0001 #ifndef GENERS_ZLIBHANDLE_HH_
0002 #define GENERS_ZLIBHANDLE_HH_
0003 
0004 extern "C" {
0005 struct z_stream_s;
0006 }
0007 
0008 namespace gs {
0009   class ZlibInflateHandle {
0010   public:
0011     ZlibInflateHandle();
0012     ~ZlibInflateHandle();
0013 
0014     inline z_stream_s &strm() { return *strm_; }
0015 
0016     ZlibInflateHandle(const ZlibInflateHandle &) = delete;
0017     ZlibInflateHandle &operator=(const ZlibInflateHandle &) = delete;
0018 
0019   private:
0020     z_stream_s *strm_;
0021   };
0022 
0023   class ZlibDeflateHandle {
0024   public:
0025     explicit ZlibDeflateHandle(int level);
0026     ~ZlibDeflateHandle();
0027 
0028     inline z_stream_s &strm() { return *strm_; }
0029     inline int level() { return level_; }
0030 
0031     ZlibDeflateHandle() = delete;
0032     ZlibDeflateHandle(const ZlibDeflateHandle &) = delete;
0033     ZlibDeflateHandle &operator=(const ZlibDeflateHandle &) = delete;
0034 
0035   private:
0036     z_stream_s *strm_;
0037     int level_;
0038   };
0039 }  // namespace gs
0040 
0041 #endif  // GENERS_ZLIBHANDLE_HH_