00001 // ===================================================================== 00002 // $Id: TDataInflation.hh,v 1.1.1.1 2003/06/27 02:56:42 goiwai Exp $ 00003 // $Name: CLDAQ-1-06-02 $ 00004 // ===================================================================== 00005 #ifndef __TDATAINFLATION_HH 00006 #define __TDATAINFLATION_HH 00007 #ifdef __CLDAQ_ZLIB_USE 00008 00009 #include "Tglobals.h" 00010 00011 class TDataInflation 00012 { 00013 00014 private: 00015 enum { tDefaultBufferSize = 1024 * 1024 }; 00016 00017 private: 00018 Tzstream theInflationStream; 00019 Tint theStatus; 00020 Tbyte* theOutputBuffer; 00021 Tint theSizeOfOutputBuffer; 00022 Tvoid* theInflatedData; 00023 Tint theSizeOfInflatedData; 00024 00025 public: 00026 TDataInflation( Tint bufsize = tDefaultBufferSize ); 00027 TDataInflation( const TDataInflation& right ); 00028 ~TDataInflation(); 00029 00030 public: 00031 const TDataInflation& operator=( const TDataInflation& right ); 00032 00033 public: 00034 Tvoid Decompress( Tvoid* input, Tint nbyte ); 00035 00036 public: 00037 const Tzstream& GetInflationStream() const; 00038 Tzstream& GetInflationStream(); 00039 Tint GetStatus() const; 00040 Tint GetSizeOfOutputBuffer() const; 00041 Tvoid* GetInflatedData() const; 00042 Tint GetSizeOfInflatedData() const; 00043 Tvoid SetOutputBuffer( Tint bufsize ); 00044 00045 }; 00046 00047 inline const Tzstream& TDataInflation::GetInflationStream() const 00048 { 00049 return( theInflationStream ); 00050 } 00051 00052 inline Tzstream& TDataInflation::GetInflationStream() 00053 { 00054 return( theInflationStream ); 00055 } 00056 00057 inline Tint TDataInflation::GetStatus() const 00058 { 00059 return( theStatus ); 00060 } 00061 00062 inline Tint TDataInflation::GetSizeOfOutputBuffer() const 00063 { 00064 return( theSizeOfOutputBuffer ); 00065 } 00066 00067 inline Tvoid* TDataInflation::GetInflatedData() const 00068 { 00069 return( theInflatedData ); 00070 } 00071 00072 inline Tint TDataInflation::GetSizeOfInflatedData() const 00073 { 00074 return( theSizeOfInflatedData ); 00075 } 00076 00077 #endif 00078 #endif