diff options
author | Jay Berkenbilt <ejb@ql.org> | 2023-12-20 16:51:56 +0100 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2023-12-20 21:46:20 +0100 |
commit | c5f622a09e6a68d87d3591346d872cf828cf82c7 (patch) | |
tree | 96db624e6bd1ec13faee88dd3e4449bbc8892b69 /libqpdf/QPDFWriter.cc | |
parent | 4c3c658e2594d1f1a5eab530d744d62a1f22d269 (diff) | |
download | qpdf-c5f622a09e6a68d87d3591346d872cf828cf82c7.tar.zst |
Bug fix: don't compress object/xref streams with --compress-streams=n
Diffstat (limited to 'libqpdf/QPDFWriter.cc')
-rw-r--r-- | libqpdf/QPDFWriter.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libqpdf/QPDFWriter.cc b/libqpdf/QPDFWriter.cc index 664ea5ff..3085e6c0 100644 --- a/libqpdf/QPDFWriter.cc +++ b/libqpdf/QPDFWriter.cc @@ -1658,8 +1658,7 @@ QPDFWriter::writeObjectStream(QPDFObjectHandle object) // Set up a stream to write the stream data into a buffer. Pipeline* next = pushPipeline(new Pl_Buffer("object stream")); - if ((m->compress_streams || (m->stream_decode_level == qpdf_dl_none)) && - (!m->qdf_mode)) { + if (m->compress_streams && !m->qdf_mode) { compressed = true; next = pushPipeline(new Pl_Flate("compress object stream", next, Pl_Flate::a_deflate)); @@ -2417,7 +2416,7 @@ QPDFWriter::writeXRefStream( Pipeline* p = pushPipeline(new Pl_Buffer("xref stream")); bool compressed = false; - if ((m->compress_streams || (m->stream_decode_level == qpdf_dl_none)) && (!m->qdf_mode)) { + if (m->compress_streams && !m->qdf_mode) { compressed = true; if (!skip_compression) { // Write the stream dictionary for compression but don't actually compress. This helps |