18#ifndef _DECAF_UTI_ZIP_DEFLATER_H_
19#define _DECAF_UTI_ZIP_DEFLATER_H_
104 Deflater(
const Deflater&);
105 Deflater operator=(
const Deflater&);
146 void setInput(
const unsigned char* buffer,
int size,
int offset,
int length);
162 void setInput(
const std::vector<unsigned char>& buffer,
int offset,
int length);
173 void setInput(
const std::vector<unsigned char>& buffer);
194 void setDictionary(
const unsigned char* buffer,
int size,
int offset,
int length);
212 void setDictionary(
const std::vector<unsigned char>& buffer,
int offset,
int length);
286 int deflate(
unsigned char* buffer,
int size,
int offset,
int length);
305 int deflate(std::vector<unsigned char>& buffer,
int offset,
int length);
319 int deflate(std::vector<unsigned char>& buffer);
void setInput(const std::vector< unsigned char > &buffer, int offset, int length)
Sets input data for compression.
static const int HUFFMAN_ONLY
Compression strategy for Huffman coding only.
Definition Deflater.h:90
static const int NO_COMPRESSION
Compression level for no compression.
Definition Deflater.h:78
int deflate(std::vector< unsigned char > &buffer, int offset, int length)
Fills specified buffer with compressed data.
void setDictionary(const unsigned char *buffer, int size, int offset, int length)
Sets preset dictionary for compression.
int deflate(std::vector< unsigned char > &buffer)
Fills specified buffer with compressed data.
static const int DEFAULT_STRATEGY
Default compression strategy.
Definition Deflater.h:95
void reset()
Resets deflater so that a new set of input data can be processed.
static const int BEST_SPEED
Compression level for fastest compression.
Definition Deflater.h:58
void setStrategy(int strategy)
Sets the compression strategy to the specified value.
static const int BEST_COMPRESSION
Compression level for best compression.
Definition Deflater.h:63
void setDictionary(const std::vector< unsigned char > &buffer, int offset, int length)
Sets preset dictionary for compression.
void end()
Closes the compressor and discards any unprocessed input.
Deflater(int level, bool nowrap=false)
Creates a new compressor using the specified compression level.
long long getBytesRead() const
static const int FILTERED
Compression strategy best used for data consisting mostly of small values with a somewhat random dist...
Definition Deflater.h:85
int deflate(unsigned char *buffer, int size, int offset, int length)
Fills specified buffer with compressed data.
void setInput(const std::vector< unsigned char > &buffer)
Sets input data for compression.
void setLevel(int level)
Sets the compression level to the specified value.
Deflater()
Creates a new compressor with the default compression level.
long long getAdler() const
void finish()
When called, indicates that compression should end with the current contents of the input buffer.
static const int DEFAULT_COMPRESSION
Default compression level.
Definition Deflater.h:68
void setDictionary(const std::vector< unsigned char > &buffer)
Sets preset dictionary for compression.
void setInput(const unsigned char *buffer, int size, int offset, int length)
Sets input data for compression.
long long getBytesWritten() const
static const int DEFLATED
Compression method for the deflate algorithm (the only one currently supported).
Definition Deflater.h:73
#define DECAF_API
Definition Config.h:29
Definition AbstractCollection.h:33
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
Definition AprPool.h:25