Atlas 0.7.0
Networking protocol for the Worldforge system.
Gzip.h
1// This file may be redistributed and modified only under the terms of
2// the GNU Lesser General Public License (See COPYING for details).
3// Copyright (C) 2000 Dmitry Derevyanko
4
5// $Id$
6
7#ifndef ATLAS_FILTERS_GZIP_H
8#define ATLAS_FILTERS_GZIP_H
9
10#include <Atlas/Filter.h>
11
12#include <zlib.h>
13
14namespace Atlas { namespace Filters {
15
16class Gzip : public Filter
17{
18 z_stream incoming;
19 z_stream outgoing;
20 unsigned char buf[4096];
21
22 public:
23
24 void begin() override;
25 void end() override;
26
27 std::string encode(const std::string&) override;
28 std::string decode(const std::string&) override;
29};
30
31} } // namespace Atlas::Filters
32
33#endif // ATLAS_FILTERS_GZIP_H
Definition: Bridge.h:20