Lucene++ - a full-featured, c++ search engine
API Documentation


Loading...
Searching...
No Matches
CompressionTools.h
Go to the documentation of this file.
1
2// Copyright (c) 2009-2014 Alan Wright. All rights reserved.
3// Distributable under the terms of either the Apache License (Version 2.0)
4// or the GNU Lesser General Public License.
6
7#ifndef COMPRESSIONTOOLS_H
8#define COMPRESSIONTOOLS_H
9
10#include "LuceneObject.h"
11
12namespace Lucene {
13
15class LPPAPI CompressionTools : public LuceneObject {
16public:
18
20
21public:
23 static ByteArray compress(uint8_t* value, int32_t offset, int32_t length, int32_t compressionLevel);
24
26 static ByteArray compress(uint8_t* value, int32_t offset, int32_t length);
27
29 static ByteArray compress(ByteArray value);
30
32 static ByteArray compressString(const String& value);
33
35 static ByteArray compressString(const String& value, int32_t compressionLevel);
36
38 static ByteArray decompress(ByteArray value);
39
41 static String decompressString(ByteArray value);
42
43protected:
44 static const int32_t COMPRESS_BUFFER;
45};
46
47}
48
49#endif
#define LUCENE_CLASS(Name)
Definition LuceneObject.h:24
Simple utility class providing static methods to compress and decompress binary data for stored field...
Definition CompressionTools.h:15
static ByteArray compress(uint8_t *value, int32_t offset, int32_t length)
Compresses the specified byte range, with default BEST_COMPRESSION level.
static String decompressString(ByteArray value)
Decompress the byte array previously returned by compressString back into a String.
static ByteArray decompress(ByteArray value)
Decompress the byte array previously returned by compress.
static ByteArray compressString(const String &value, int32_t compressionLevel)
Compresses the String value using the specified compressionLevel.
static ByteArray compress(ByteArray value)
Compresses all bytes in the array, with default BEST_COMPRESSION level.
static ByteArray compress(uint8_t *value, int32_t offset, int32_t length, int32_t compressionLevel)
Compresses the specified byte range using the specified compressionLevel.
static const int32_t COMPRESS_BUFFER
Definition CompressionTools.h:44
static ByteArray compressString(const String &value)
Compresses the String value, with default BEST_COMPRESSION level.
Base class for all Lucene classes.
Definition LuceneObject.h:31
Definition AbstractAllTermDocs.h:12

clucene.sourceforge.net