blob: f4be9e471e106d7324d94e84af18ef0752bf2a31 (
plain)
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
66
67
68
69
|
//========================================================================
//
// FlateStream.h
//
// Copyright (C) 2005, Jeff Muizelaar <jeff@infidigm.net>
//
// This file is under the GPLv2 or later license
//
//========================================================================
#ifndef FLATESTREAM_H
#define FLATESTREAM_H
#include <config.h>
#ifdef USE_GCC_PRAGMAS
#pragma interface
#endif
#ifdef USE_GCC_PRAGMAS
#pragma implementation
#endif
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <string.h>
#include <ctype.h>
#include "goo/gmem.h"
#include "goo/gfile.h"
#include "poppler-config.h"
#include "Error.h"
#include "Object.h"
#include "Decrypt.h"
#include "Stream.h"
extern "C" {
#include <zlib.h>
}
class FlateStream: public FilterStream {
public:
FlateStream(Stream *strA, int predictor, int columns, int colors, int bits);
virtual ~FlateStream();
virtual StreamKind getKind() { return strFlate; }
virtual void reset();
virtual int getChar();
virtual int lookChar();
virtual int getRawChar();
virtual GooString *getPSFilter(int psLevel, char *indent);
virtual GBool isBinary(GBool last = gTrue);
private:
int fill_buffer(void);
z_stream d_stream;
StreamPredictor *pred;
int status;
/* in_buf currently needs to be 1 or we over read from EmbedStreams */
unsigned char in_buf[1];
unsigned char out_buf[4096];
int out_pos;
int out_buf_len;
};
#endif
|