0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
BlockCompressionCodecQuicklz.h
Go to the documentation of this file.
1 /* -*- c++ -*-
2  * Copyright (C) 2007-2015 Hypertable, Inc.
3  *
4  * This file is part of Hypertable.
5  *
6  * Hypertable is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; version 3 of the
9  * License, or any later version.
10  *
11  * Hypertable is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19  * 02110-1301, USA.
20  */
21 
26 
27 #ifndef HYPERTABLE_BLOCKCOMPRESSIONCODECQUICKLZ_H
28 #define HYPERTABLE_BLOCKCOMPRESSIONCODECQUICKLZ_H
29 
31 
32 #include <ThirdParty/quicklz/quicklz.h>
33 
34 namespace Hypertable {
35 
38 
46 
47  public:
48 
54  BlockCompressionCodecQuicklz(const Args &args) { set_args(args); }
55 
58 
79  virtual void deflate(const DynamicBuffer &input, DynamicBuffer &output,
80  BlockHeader &header, size_t reserve=0);
81 
87  virtual void inflate(const DynamicBuffer &input, DynamicBuffer &output,
88  BlockHeader &header);
89 
94  virtual int get_type() { return QUICKLZ; }
95 
96  private:
97 
99  qlz_state_compress m_compress;
100 
102  qlz_state_decompress m_decompress;
103  };
104 
106 }
107 
108 #endif // HYPERTABLE_BLOCKCOMPRESSIONCODECQUICKLZ_H
109 
virtual void set_args(const Args &args)
Sets arguments to control compression behavior.
qlz_state_compress m_compress
Compression state.
virtual void deflate(const DynamicBuffer &input, DynamicBuffer &output, BlockHeader &header, size_t reserve=0)
Compresses a buffer using the QUICKLZ algorithm.
Block compressor that uses the QUICKLZ algorithm.
Declarations for BlockCompressionCodec.
A dynamic, resizable and reference counted memory buffer.
Definition: DynamicBuffer.h:42
std::vector< String > Args
Compression codec argument vector.
qlz_state_decompress m_decompress
Decompression state.
Hypertable definitions
virtual void inflate(const DynamicBuffer &input, DynamicBuffer &output, BlockHeader &header)
Decompresses a buffer compressed with the QUICKLZ algorithm.
virtual int get_type()
Returns enum value representing compression type QUICKLZ.
BlockCompressionCodecQuicklz(const Args &args)
Constructor.
Base class for block headers.
Definition: BlockHeader.h:48
Abstract base class for block compression codecs.