2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-05-31 17:30:54 +00:00
qpdf/libqpdf/qpdf/SF_RunLengthDecode.hh

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

39 lines
821 B
C++
Raw Permalink Normal View History

#include <qpdf/Pl_RunLength.hh>
#include <qpdf/QPDFStreamFilter.hh>
#include <memory>
#ifndef SF_RUNLENGTHDECODE_HH
# define SF_RUNLENGTHDECODE_HH
class SF_RunLengthDecode: public QPDFStreamFilter
{
public:
SF_RunLengthDecode() = default;
~SF_RunLengthDecode() override = default;
2023-05-20 12:56:33 +00:00
Pipeline*
getDecodePipeline(Pipeline* next) override
{
this->pipeline =
std::make_shared<Pl_RunLength>("runlength decode", next, Pl_RunLength::a_decode);
return this->pipeline.get();
}
static std::shared_ptr<QPDFStreamFilter>
factory()
{
return std::make_shared<SF_RunLengthDecode>();
}
2023-05-20 12:56:33 +00:00
bool
isSpecializedCompression() override
{
return true;
}
private:
std::shared_ptr<Pipeline> pipeline;
};
#endif // SF_RUNLENGTHDECODE_HH