aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/qpdf/QPDF_Stream.hh
blob: 71381fd33ee3125e8b88be8c38f9479dfab18148 (plain) (blame)
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

#ifndef __QPDF_STREAM_HH__
#define __QPDF_STREAM_HH__

#include <qpdf/QPDFObject.hh>

#include <qpdf/QPDFObjectHandle.hh>

class Pipeline;
class QPDF;

class QPDF_Stream: public QPDFObject
{
  public:
    QPDF_Stream(QPDF*, int objid, int generation,
		QPDFObjectHandle stream_dict,
		off_t offset, int length);
    virtual ~QPDF_Stream();
    virtual std::string unparse();
    QPDFObjectHandle getDict() const;

    // See comments in QPDFObjectHandle.hh
    bool pipeStreamData(Pipeline*, bool filter,
			bool normalize, bool compress);

    // See comments in QPDFObjectHandle.hh
    PointerHolder<Buffer> getStreamData();

  private:
    bool filterable(std::vector<std::string>& filters,
		    int& predictor, int& columns, bool& early_code_change);


    QPDF* qpdf;
    int objid;
    int generation;
    QPDFObjectHandle stream_dict;
    off_t offset;
    int length;
};

#endif // __QPDF_STREAM_HH__