Dictionary optimalization

This commit is contained in:
Jakub Melka
2020-06-08 19:42:00 +02:00
parent 4e4bf111da
commit 958737f359
14 changed files with 188 additions and 29 deletions

View File

@ -537,7 +537,7 @@ bool PDFOptimizer::performRecompressFlateStreams()
{
bytesSaved += currentBytesSaved;
PDFDictionary updatedDictionary = *dictionary;
updatedDictionary.setEntry("Length", PDFObject::createInteger(recompressedData.size()));
updatedDictionary.setEntry(PDFInplaceOrMemoryString("Length"), PDFObject::createInteger(recompressedData.size()));
entry.object = PDFObject::createStream(std::make_shared<PDFStream>(qMove(updatedDictionary), qMove(recompressedData)));
}
}