Delete all Trailing spaces in code.
[reactos.git] / rosapps / smartpdf / poppler / poppler / FlateStream.h
1 //========================================================================
2 //
3 // FlateStream.h
4 //
5 // Copyright (C) 2005, Jeff Muizelaar
6 //
7 //========================================================================
8
9 #ifndef FLATESTREAM_H
10 #define FLATESTREAM_H
11 #include <config.h>
12
13 #ifdef USE_GCC_PRAGMAS
14 #pragma interface
15 #endif
16
17
18 #ifdef USE_GCC_PRAGMAS
19 #pragma implementation
20 #endif
21
22 #include <stdio.h>
23 #include <stdlib.h>
24 #include <stddef.h>
25 #ifndef WIN32
26 #include <unistd.h>
27 #endif
28 #include <string.h>
29 #include <ctype.h>
30 #include "goo/gmem.h"
31 #include "goo/gfile.h"
32 #include "poppler-config.h"
33 #include "Error.h"
34 #include "Object.h"
35 #include "Decrypt.h"
36 #include "Stream.h"
37
38 extern "C" {
39 #include <zlib.h>
40 }
41
42 class FlateStream: public FilterStream {
43 public:
44
45 FlateStream(Stream *strA, int predictor, int columns, int colors, int bits);
46 virtual ~FlateStream();
47 virtual StreamKind getKind() { return strFlate; }
48 virtual void reset();
49 virtual int getChar();
50 virtual int lookChar();
51 virtual GooString *getPSFilter(int psLevel, char *indent);
52 virtual GBool isBinary(GBool last = gTrue);
53
54 int getRawChar() {
55 if (fill_buffer())
56 return EOF;
57
58 return out_buf[out_pos++];
59 }
60
61 private:
62 int fill_buffer(void);
63 z_stream d_stream;
64 StreamPredictor *pred;
65 int status;
66 /* in_buf currently needs to be 1 or we over read from EmbedStreams */
67 unsigned char in_buf[1];
68 unsigned char out_buf[4096];
69 int out_pos;
70 int out_buf_len;
71 };
72
73 #endif