Coverage Report

Created: 2026-08-13 07:14

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/qpdf/libqpdf/qpdf/SF_RunLengthDecode.hh
Line
Count
Source
1
#include <qpdf/Pl_RunLength.hh>
2
#include <qpdf/QPDFStreamFilter.hh>
3
#include <memory>
4
5
#ifndef SF_RUNLENGTHDECODE_HH
6
# define SF_RUNLENGTHDECODE_HH
7
8
class SF_RunLengthDecode: public QPDFStreamFilter
9
{
10
  public:
11
30.4k
    SF_RunLengthDecode() = default;
12
30.4k
    ~SF_RunLengthDecode() override = default;
13
14
    Pipeline*
15
    getDecodePipeline(Pipeline* next) override
16
25.0k
    {
17
25.0k
        this->pipeline =
18
25.0k
            std::make_shared<Pl_RunLength>("runlength decode", next, Pl_RunLength::a_decode);
19
25.0k
        return this->pipeline.get();
20
25.0k
    }
21
22
    static std::shared_ptr<QPDFStreamFilter>
23
    factory()
24
30.4k
    {
25
30.4k
        return std::make_shared<SF_RunLengthDecode>();
26
30.4k
    }
27
28
    bool
29
    isSpecializedCompression() override
30
44
    {
31
44
        return true;
32
44
    }
33
34
  private:
35
    std::shared_ptr<Pipeline> pipeline;
36
};
37
38
#endif // SF_RUNLENGTHDECODE_HH