<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body><span class="vcard"><a class="email" href="mailto:ajohnson@redneon.com" title="Adrian Johnson <ajohnson@redneon.com>"> <span class="fn">Adrian Johnson</span></a>
</span> changed
<a class="bz_bug_link
bz_status_NEEDINFO "
title="NEEDINFO - LZW decompression can fail"
href="https://bugs.freedesktop.org/show_bug.cgi?id=103174">bug 103174</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Status</td>
<td>NEW
</td>
<td>NEEDINFO
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEEDINFO "
title="NEEDINFO - LZW decompression can fail"
href="https://bugs.freedesktop.org/show_bug.cgi?id=103174#c1">Comment # 1</a>
on <a class="bz_bug_link
bz_status_NEEDINFO "
title="NEEDINFO - LZW decompression can fail"
href="https://bugs.freedesktop.org/show_bug.cgi?id=103174">bug 103174</a>
from <span class="vcard"><a class="email" href="mailto:ajohnson@redneon.com" title="Adrian Johnson <ajohnson@redneon.com>"> <span class="fn">Adrian Johnson</span></a>
</span></b>
<pre><span class="quote">> But the compression is not per definition limited to this size.</span >
Actually, it is. From the PDF spec:
"Codes shall never be longer than 12 bits; therefore, entry 4095 is the last
entry of the LZW table."
<span class="quote">> I have seen PDF files with tables up to a size of 32k entries.</span >
I'm surprised if this is the case. We output a specific error for this case and
no one has previously reported it. We handle up to 4096 for the benefit of PDF
generators that can't count.
Changing the size of the symbol table is not as simple as just changing the
array size. The code needs to modified to increase the symbol bit size as the
number of symbols increases. But the worst part is we can no longer copy the
uncompressed LZW stream when outputting to a PDF or PS file. The stream needs
to be uncompressed and recompressed to ensure our output conforms to the spec.
That will have a performance impact on every file just to fix the very rare
cases where the PDF is broken.
I'll leave it up to Albert to decide if he wants to change this.
In any case, we will need PDFs to test with. Preferably with a range of
different symbol table sizes that covers the powers of two.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>