summaryrefslogtreecommitdiffstats
path: root/libqpdf/qpdf/SF_DCTDecode.hh
diff options
context:
space:
mode:
Diffstat (limited to 'libqpdf/qpdf/SF_DCTDecode.hh')
-rw-r--r--libqpdf/qpdf/SF_DCTDecode.hh39
1 files changed, 39 insertions, 0 deletions
diff --git a/libqpdf/qpdf/SF_DCTDecode.hh b/libqpdf/qpdf/SF_DCTDecode.hh
new file mode 100644
index 00000000..28aa42c1
--- /dev/null
+++ b/libqpdf/qpdf/SF_DCTDecode.hh
@@ -0,0 +1,39 @@
+#include <qpdf/QPDFStreamFilter.hh>
+#include <qpdf/Pl_DCT.hh>
+#include <memory>
+
+#ifndef SF_DCTDECODE_HH
+#define SF_DCTDECODE_HH
+
+class SF_DCTDecode: public QPDFStreamFilter
+{
+ public:
+ SF_DCTDecode() = default;
+ virtual ~SF_DCTDecode() = default;
+
+ virtual Pipeline* getDecodePipeline(Pipeline* next) override
+ {
+ this->pipeline = std::make_shared<Pl_DCT>("DCT decode", next);
+ return this->pipeline.get();
+ }
+
+ static std::shared_ptr<QPDFStreamFilter> factory()
+ {
+ return std::make_shared<SF_DCTDecode>();
+ }
+
+ virtual bool isSpecializedCompression() override
+ {
+ return true;
+ }
+
+ virtual bool isLossyCompression() override
+ {
+ return true;
+ }
+
+ private:
+ std::shared_ptr<Pipeline> pipeline;
+};
+
+#endif // SF_DCTDECODE_HH