00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef _DECAF_UTI_ZIP_INFLATER_H_
00019 #define _DECAF_UTI_ZIP_INFLATER_H_
00020
00021 #include <decaf/util/Config.h>
00022
00023 #include <decaf/lang/exceptions/NullPointerException.h>
00024 #include <decaf/lang/exceptions/IllegalArgumentException.h>
00025 #include <decaf/lang/exceptions/IllegalStateException.h>
00026 #include <decaf/lang/exceptions/IndexOutOfBoundsException.h>
00027
00028 #include <decaf/util/zip/DataFormatException.h>
00029
00030 #include <vector>
00031
00032 namespace decaf {
00033 namespace util {
00034 namespace zip {
00035
00036 class InflaterData;
00037
00054 class DECAF_API Inflater {
00055 private:
00056
00057 InflaterData* data;
00058
00059 private:
00060
00061 Inflater( const Inflater& );
00062 Inflater& operator=( const Inflater& );
00063
00064 public:
00065
00070 Inflater();
00071
00081 Inflater( bool nowrap );
00082
00083 virtual ~Inflater();
00084
00102 void setInput( const unsigned char* buffer, int size, int offset, int length );
00103
00118 void setInput( const std::vector<unsigned char>& buffer, int offset, int length );
00119
00129 void setInput( const std::vector<unsigned char>& buffer );
00130
00137 int getRemaining() const;
00138
00160 void setDictionary( const unsigned char* buffer, int size, int offset, int length );
00161
00180 void setDictionary( const std::vector<unsigned char>& buffer, int offset, int length );
00181
00195 void setDictionary( const std::vector<unsigned char>& buffer );
00196
00201 bool needsInput() const;
00202
00206 bool needsDictionary() const;
00207
00212 void finish();
00213
00217 bool finished() const;
00218
00239 int inflate( unsigned char* buffer, int size, int offset, int length );
00240
00258 int inflate( std::vector<unsigned char>& buffer, int offset, int length );
00259
00272 int inflate( std::vector<unsigned char>& buffer );
00273
00279 long long getAdler() const;
00280
00286 long long getBytesRead() const;
00287
00293 long long getBytesWritten() const;
00294
00301 void reset();
00302
00308 void end();
00309
00310 };
00311
00312 }}}
00313
00314 #endif