SHOGUN  v3.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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 #include <shogun/lib/common.h>
15 #include <shogun/base/SGObject.h>
16 #include <shogun/io/SGIO.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__

SHOGUN Machine Learning Toolbox - Documentation