0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
BlockCompressionCodecBmz.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_BLOCKCOMPRESSIONCODECBMZ_H
28 #define HYPERTABLE_BLOCKCOMPRESSIONCODECBMZ_H
29 
31 
32 #include <Common/DynamicBuffer.h>
33 
34 namespace Hypertable {
35 
38 
50  public:
51 
58  BlockCompressionCodecBmz(const Args &args);
59 
61  virtual ~BlockCompressionCodecBmz();
62 
83  virtual void deflate(const DynamicBuffer &input, DynamicBuffer &output,
84  BlockHeader &header, size_t reserve=0);
85 
91  virtual void inflate(const DynamicBuffer &input, DynamicBuffer &output,
92  BlockHeader &header);
93 
110  virtual void set_args(const Args &args);
111 
116  virtual int get_type() { return BMZ; }
117 
118  private:
119 
122 
124  size_t m_offset;
125 
127  size_t m_fp_len;
128  };
129 
131 
132 } // namespace Hypertable
133 
134 #endif // HYPERTABLE_BLOCKCOMPRESSIONCODECBMZ_H
virtual void set_args(const Args &args)
Sets arguments to control compression behavior.
size_t m_offset
Starting offset of fingerprints.
Declarations for BlockCompressionCodec.
A dynamic, resizable and reference counted memory buffer.
Definition: DynamicBuffer.h:42
std::vector< String > Args
Compression codec argument vector.
Bentley-McIlroy large common substring compression.
BlockCompressionCodecBmz(const Args &args)
Constructor.
A dynamic, resizable memory buffer.
virtual void deflate(const DynamicBuffer &input, DynamicBuffer &output, BlockHeader &header, size_t reserve=0)
Compresses a buffer using the BMZ algorithm.
Block compressor that uses the BMZ algorithm.
Hypertable definitions
virtual void inflate(const DynamicBuffer &input, DynamicBuffer &output, BlockHeader &header)
Decompresses a buffer compressed with the BMZ algorithm.
DynamicBuffer m_workmem
Working memory buffer used by deflate() and inflate()
virtual int get_type()
Returns enum value representing compression type BMZ.
Base class for block headers.
Definition: BlockHeader.h:48
Abstract base class for block compression codecs.