blob: 1047b374a3013a70439d487ea416cd7bb38cf294 [file] [log] [blame]
Constantin Kaplinskya2adc8d2006-05-25 05:01:55 +00001/* Copyright (C) 2000-2003 Constantin Kaplinsky. All Rights Reserved.
2 *
3 * This is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This software is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this software; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
16 * USA.
17 */
18#ifndef __RFB_TIGHTDECODER_H__
19#define __RFB_TIGHTDECODER_H__
20
21#include <rdr/ZlibInStream.h>
22#include <rfb/Decoder.h>
23
24namespace rfb {
25
26 class TightDecoder : public Decoder {
27 public:
28 static Decoder* create(CMsgReader* reader);
29 virtual void readRect(const Rect& r, CMsgHandler* handler);
30 virtual ~TightDecoder();
31 private:
32 TightDecoder(CMsgReader* reader);
33 CMsgReader* reader;
34 rdr::ZlibInStream zis[4];
35 };
36
37 // Compression control
38 const unsigned int rfbTightExplicitFilter = 0x04;
39 const unsigned int rfbTightFill = 0x08;
40 const unsigned int rfbTightJpeg = 0x09;
41 const unsigned int rfbTightMaxSubencoding = 0x09;
42
43 // Filters to improve compression efficiency
44 const unsigned int rfbTightFilterCopy = 0x00;
45 const unsigned int rfbTightFilterPalette = 0x01;
46 const unsigned int rfbTightFilterGradient = 0x02;
47}
48
49#endif