File: algo0x15.h

package info (click to toggle)
splix 2.0.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,608 kB
  • sloc: cpp: 4,907; makefile: 424; ansic: 42; sh: 38; xml: 34; python: 8
file content (65 lines) | stat: -rw-r--r-- 2,122 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/*
 * 	    algo0x15.h                (C) 2007-2008, Aurélien Croc (AP²C)
 *                                    This file is a SpliX derivative work
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; version 2 of the License.
 * 
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the
 *  Free Software Foundation, Inc.,
 *  51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 *
 *  $Id: algo0x15.h 287 2011-02-19 19:10:22Z tillkamppeter $
 *  --
 *  This code was written by Leonardo Hamada
 * 
 */
#ifndef _ALGO0X15_H_
#define _ALGO0X15_H_

#ifndef DISABLE_JBIG

#include <stddef.h>
#include "algorithm.h"
/**
  * @brief This class implements the compression algorithm 0x15.
  */
class Algo0x15 : public Algorithm
{
    protected:
        bool                    _error;
        bool                    _has_bih;
        unsigned char           _bih[20];
        unsigned char*          _data;
        unsigned long           _size;
        unsigned long           _maxSize;

    public:
        Algo0x15();
        virtual ~Algo0x15();

    public:
        static void             _callback(unsigned char *data, size_t len, void *arg);

    public:
        virtual BandPlane*      compress(const Request& request, 
                                    unsigned char *data, unsigned long width,
                                    unsigned long height);
        /* Returns BIH for the compressed image band,
           after compress has been called. */
        const unsigned char*    getBIHdata() const { return _bih; } 
};

#endif /* DISABLE_JBIG */

#endif /* _ALGO0X15_H_ */

/* vim: set expandtab tabstop=4 shiftwidth=4 smarttab tw=80 cin enc=utf8: */