aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/qpdf/SF_FlateLzwDecode.hh
blob: 203d893b770719a9bca6b3de08fe962c77cd5518 (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
#include <qpdf/QPDFStreamFilter.hh>
#include <memory>
#include <vector>

#ifndef SF_FLATELZWDECODE_HH
# define SF_FLATELZWDECODE_HH

class SF_FlateLzwDecode: public QPDFStreamFilter
{
  public:
    SF_FlateLzwDecode(bool lzw);
    ~SF_FlateLzwDecode() override = default;

    bool setDecodeParms(QPDFObjectHandle decode_parms) override;
    Pipeline* getDecodePipeline(Pipeline* next) override;

    static std::shared_ptr<QPDFStreamFilter> flate_factory();
    static std::shared_ptr<QPDFStreamFilter> lzw_factory();

  private:
    bool lzw;
    int predictor;
    int columns;
    int colors;
    int bits_per_component;
    bool early_code_change;
    std::vector<std::shared_ptr<Pipeline>> pipelines;
};

#endif // SF_FLATELZWDECODE_HH