activemq-cpp-3.9.5
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
32namespace decaf {
33namespace util {
34namespace zip {
35
36 class InflaterData;
37
54 class DECAF_API Inflater {
55 private:
56
57 InflaterData* data;
58
59 private:
60
61 Inflater(const Inflater&);
62 Inflater& operator=(const Inflater&);
63
64 public:
65
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_ */
void setInput(const std::vector< unsigned char > &buffer)
Sets input data for decompression.
void setDictionary(const unsigned char *buffer, int size, int offset, int length)
Sets the preset dictionary to the given array of bytes.
void reset()
Resets deflater so that a new set of input data can be processed.
void setDictionary(const std::vector< unsigned char > &buffer)
Sets the preset dictionary to the given array of bytes.
Inflater(bool nowrap)
Creates a new decompressor.
int getRemaining() const
Returns the total number of bytes remaining in the input buffer.
void setInput(const unsigned char *buffer, int size, int offset, int length)
Sets input data for decompression.
long long getBytesRead() const
int inflate(std::vector< unsigned char > &buffer)
Uncompresses bytes into specified buffer.
void end()
Closes the decompressor and discards any unprocessed input.
Inflater()
Creates a new decompressor.
long long getBytesWritten() const
long long getAdler() const
int inflate(std::vector< unsigned char > &buffer, int offset, int length)
Uncompresses bytes into specified buffer.
void setDictionary(const std::vector< unsigned char > &buffer, int offset, int length)
Sets the preset dictionary to the given array of bytes.
void finish()
When called, indicates that decompression should end with the current contents of the input buffer.
void setInput(const std::vector< unsigned char > &buffer, int offset, int length)
Sets input data for decompression.
int inflate(unsigned char *buffer, int size, int offset, int length)
Uncompresses bytes into specified buffer.
#define DECAF_API
Definition Config.h:29
Definition Adler32.h:26
Definition AbstractCollection.h:33
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
Definition AprPool.h:25