LIBRCSC Docs
Documentation for HELIOS's BASE LIBRCSC library for RoboCup 2D Simulation League.
All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
gzcompressor.h
Go to the documentation of this file.
1// -*-c++-*-
2
8/*
9 *Copyright:
10
11 Copyright (C) Hidehisa Akiyama
12
13 This code is free software; you can redistribute it and/or
14 modify it under the terms of the GNU Lesser General Public
15 License as published by the Free Software Foundation; either
16 version 3 of the License, or (at your option) any later version.
17
18 This library is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 Lesser General Public License for more details.
22
23 You should have received a copy of the GNU Lesser General Public
24 License along with this library; if not, write to the Free Software
25 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26
27 *EndCopyright:
28 */
29
31
32#ifndef RCSC_GZ_GZCOMPRESSOR_H
33#define RCSC_GZ_GZCOMPRESSOR_H
34
35#include <memory>
36#include <string>
37
38namespace rcsc {
39
45private:
47 struct Impl;
48
50 std::unique_ptr< Impl > M_impl;
51
52public:
53
58 explicit
59 GZCompressor( const int level = 6 );
60
65
71 int setLevel( const int level );
72
80 int compress( const char * src_buf,
81 const int src_size,
82 std::string & dest );
83
84};
85
86
88
94private:
96 struct Impl;
97
99 std::unique_ptr< Impl > M_impl;
100
101public:
102
107
112
120 int decompress( const char * src_buf,
121 const int src_size,
122 std::string & dest );
123
124};
125
126}
127
128#endif
compress message string
Definition: gzcompressor.h:44
~GZCompressor()
destruct implementation
int compress(const char *src_buf, const int src_size, std::string &dest)
compress the src_buf and copy output buffer to std::string
GZCompressor(const int level=6)
construct with compression level
int setLevel(const int level)
set zlib compression level
decompress message string
Definition: gzcompressor.h:93
~GZDecompressor()
destruct implementation
int decompress(const char *src_buf, const int src_size, std::string &dest)
decompress the src_buf and copy output buffer to std::string
GZDecompressor()
construct implementation