activemq-cpp-3.8.2
Inflater.h
Go to the documentation of this file.
1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one or more
3  * contributor license agreements. See the NOTICE file distributed with
4  * this work for additional information regarding copyright ownership.
5  * The ASF licenses this file to You under the Apache License, Version 2.0
6  * (the "License"); you may not use this file except in compliance with
7  * the License. You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
18 #ifndef _DECAF_UTI_ZIP_INFLATER_H_
19 #define _DECAF_UTI_ZIP_INFLATER_H_
20 
21 #include <decaf/util/Config.h>
22 
27 
29 
30 #include <vector>
31 
32 namespace decaf {
33 namespace util {
34 namespace zip {
35 
36  class InflaterData;
37 
55  private:
56 
57  InflaterData* data;
58 
59  private:
60 
61  Inflater( const Inflater& );
62  Inflater& operator=( const Inflater& );
63 
64  public:
65 
70  Inflater();
71 
81  Inflater( bool nowrap );
82 
83  virtual ~Inflater();
84 
102  void setInput( const unsigned char* buffer, int size, int offset, int length );
103 
118  void setInput( const std::vector<unsigned char>& buffer, int offset, int length );
119 
129  void setInput( const std::vector<unsigned char>& buffer );
130 
137  int getRemaining() const;
138 
160  void setDictionary( const unsigned char* buffer, int size, int offset, int length );
161 
180  void setDictionary( const std::vector<unsigned char>& buffer, int offset, int length );
181 
195  void setDictionary( const std::vector<unsigned char>& buffer );
196 
201  bool needsInput() const;
202 
206  bool needsDictionary() const;
207 
212  void finish();
213 
217  bool finished() const;
218 
239  int inflate( unsigned char* buffer, int size, int offset, int length );
240 
258  int inflate( std::vector<unsigned char>& buffer, int offset, int length );
259 
272  int inflate( std::vector<unsigned char>& buffer );
273 
279  long long getAdler() const;
280 
286  long long getBytesRead() const;
287 
293  long long getBytesWritten() const;
294 
301  void reset();
302 
308  void end();
309 
310  };
311 
312 }}}
313 
314 #endif /* _DECAF_UTI_ZIP_INFLATER_H_ */
#define DECAF_API
Definition: Config.h:29
This class uncompresses data that was compressed using the DEFLATE algorithm (see specification)...
Definition: Inflater.h:54
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements...
Definition: AprPool.h:25