SHOGUN  4.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Compressor.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or modify
3  * it under the terms of the GNU General Public License as published by
4  * the Free Software Foundation; either version 3 of the License, or
5  * (at your option) any later version.
6  *
7  * Written (W) 2009 Soeren Sonnenburg
8  * Copyright (C) 2009 Berlin Institute of Technology
9  */
10 #ifndef __COMPRESSOR_H__
11 #define __COMPRESSOR_H__
12 
13 #include <shogun/lib/config.h>
14 
15 #include <shogun/lib/common.h>
16 #include <shogun/base/SGObject.h>
17 
18 namespace shogun
19 {
22  {
24  LZO,
29  };
30 
31 
46  class CCompressor : public CSGObject
47  {
48  public:
50  CCompressor();
51 
57  {
58  }
59 
61  virtual ~CCompressor()
62  {
63  }
64 
76  void compress(uint8_t* uncompressed, uint64_t uncompressed_size,
77  uint8_t* &compressed, uint64_t &compressed_size, int32_t level=1);
78 
91  void decompress(uint8_t* compressed, uint64_t compressed_size,
92  uint8_t* uncompressed, uint64_t& uncompressed_size);
93 
95  virtual const char* get_name() const { return "Compressor"; }
96 
97  protected:
100  };
101 }
102 #endif //__COMPRESSOR_H__
E_COMPRESSION_TYPE compression_type
Definition: Compressor.h:99
Compression library for compressing and decompressing buffers using one of the standard compression a...
Definition: Compressor.h:46
virtual const char * get_name() const
Definition: Compressor.h:95
Class SGObject is the base class of all shogun objects.
Definition: SGObject.h:112
E_COMPRESSION_TYPE
Definition: Compressor.h:21
void compress(uint8_t *uncompressed, uint64_t uncompressed_size, uint8_t *&compressed, uint64_t &compressed_size, int32_t level=1)
Definition: Compressor.cpp:44
all of classes and functions are contained in the shogun namespace
Definition: class_list.h:18
void decompress(uint8_t *compressed, uint64_t compressed_size, uint8_t *uncompressed, uint64_t &uncompressed_size)
Definition: Compressor.cpp:209
CCompressor(E_COMPRESSION_TYPE ct)
Definition: Compressor.h:56
virtual ~CCompressor()
Definition: Compressor.h:61

SHOGUN Machine Learning Toolbox - Documentation