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-2011 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  {
17  public:
18  virtual ~CompressionTools();
19 
21 
22  public:
24  static ByteArray compress(uint8_t* value, int32_t offset, int32_t length, int32_t compressionLevel);
25 
27  static ByteArray compress(uint8_t* value, int32_t offset, int32_t length);
28 
30  static ByteArray compress(ByteArray value);
31 
33  static ByteArray compressString(const String& value);
34 
36  static ByteArray compressString(const String& value, int32_t compressionLevel);
37 
39  static ByteArray decompress(ByteArray value);
40 
42  static String decompressString(ByteArray value);
43 
44  protected:
45  static const int32_t COMPRESS_BUFFER;
46  };
47 }
48 
49 #endif

clucene.sourceforge.net