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


 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
CompressionTools.h
Go to the documentation of this file.
1 // 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 
12 namespace Lucene {
13 
15 class LPPAPI CompressionTools : public LuceneObject {
16 public:
17  virtual ~CompressionTools();
18 
20 
21 public:
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 
43 protected:
44  static const int32_t COMPRESS_BUFFER;
45 };
46 
47 }
48 
49 #endif
static const int32_t COMPRESS_BUFFER
Definition: CompressionTools.h:44
Base class for all Lucene classes.
Definition: LuceneObject.h:31
#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
Definition: AbstractAllTermDocs.h:12

clucene.sourceforge.net