xapian-core
1.4.26
|
#include <compression_stream.h>
Public Member Functions | |
CompressionStream (int compress_strategy_=Z_DEFAULT_STRATEGY) | |
~CompressionStream () | |
const char * | compress (const char *buf, size_t *p_size) |
void | decompress_start () |
bool | decompress_chunk (const char *p, int len, std::string &buf) |
Returns true if this was the final chunk. More... | |
Private Member Functions | |
void | lazy_alloc_deflate_zstream () |
Allocate the zstream for deflating, if not already allocated. More... | |
void | lazy_alloc_inflate_zstream () |
Allocate the zstream for inflating, if not already allocated. More... | |
Private Attributes | |
int | compress_strategy |
size_t | out_len |
char * | out |
z_stream * | deflate_zstream |
Zlib state object for deflating. More... | |
z_stream * | inflate_zstream |
Zlib state object for inflating. More... | |
Definition at line 29 of file compression_stream.h.
|
inlineexplicit |
Definition at line 54 of file compression_stream.h.
References compress(), and ~CompressionStream().
CompressionStream::~CompressionStream | ( | ) |
Definition at line 34 of file compression_stream.cc.
Referenced by CompressionStream().
const char * CompressionStream::compress | ( | const char * | buf, |
size_t * | p_size | ||
) |
Definition at line 53 of file compression_stream.cc.
Referenced by CompressionStream().
bool CompressionStream::decompress_chunk | ( | const char * | p, |
int | len, | ||
std::string & | buf | ||
) |
Returns true if this was the final chunk.
Definition at line 87 of file compression_stream.cc.
Referenced by Glass::LeafItem_base< uint8_t *>::decompress_chunk(), and decompress_start().
|
inline |
Definition at line 66 of file compression_stream.h.
References decompress_chunk(), and lazy_alloc_inflate_zstream().
|
private |
Allocate the zstream for deflating, if not already allocated.
Definition at line 118 of file compression_stream.cc.
References rare, Xapian::Internal::str(), and usual.
|
private |
Allocate the zstream for inflating, if not already allocated.
Definition at line 155 of file compression_stream.cc.
References rare, Xapian::Internal::str(), and usual.
Referenced by decompress_start().
|
private |
Definition at line 30 of file compression_stream.h.
|
private |
Zlib state object for deflating.
Definition at line 37 of file compression_stream.h.
|
private |
Zlib state object for inflating.
Definition at line 40 of file compression_stream.h.
|
private |
Definition at line 34 of file compression_stream.h.
|
private |
Definition at line 32 of file compression_stream.h.