<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:clearspace="http://www.jivesoftware.com/xmlns/jive/rss" version="2.0">
  <channel>
    <title>Adobe Community: Message List - Reading a PDF stream for LZW decompression?</title>
    <link>https://forums.adobe.com/community/design_development/pdf_language_and_specifications?view=discussions</link>
    <description>Most recent forum messages</description>
    <language>en</language>
    <pubDate>Sun, 08 Dec 2013 18:28:47 GMT</pubDate>
    <generator>Jive Engage 7.0.0.1  (http://jivesoftware.com/products/)</generator>
    <dc:date>2013-12-08T18:28:47Z</dc:date>
    <dc:language>en</dc:language>
    <item>
      <title>Re: Reading a PDF stream for LZW decompression?</title>
      <link>https://forums.adobe.com/message/5911719?tstart=0#5911719</link>
      <description>&lt;!-- [DocumentBodyStart:fa1c3103-4041-44f1-92e5-295d66a519a8] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;You read each character of the PDF or each character of the stream?&amp;nbsp; And you've verified that the stream is indeed using the LZW filter (because it's rare to find some PDFs these days)?&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:fa1c3103-4041-44f1-92e5-295d66a519a8] --&gt;&lt;img src='/beacon?t=1415903279293' /&gt;</description>
      <pubDate>Sun, 08 Dec 2013 18:28:47 GMT</pubDate>
      <author>forums_noreply@adobe.com</author>
      <guid>https://forums.adobe.com/message/5911719?tstart=0#5911719</guid>
      <dc:date>2013-12-08T18:28:47Z</dc:date>
      <clearspace:dateToText>11 months 5 days ago</clearspace:dateToText>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
    <item>
      <title>Reading a PDF stream for LZW decompression?</title>
      <link>https://forums.adobe.com/message/5911157?tstart=0#5911157</link>
      <description>&lt;!-- [DocumentBodyStart:ac5096d5-f446-4a30-a363-145c2d60f4d9] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p style="background-color: #e7e7e7; font-family: adobe-clean, 'Helvetica Neue', Arial, sans-serif;"&gt;Hello..&amp;nbsp; I'm really struggling here.&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="background-color: #e7e7e7; font-family: adobe-clean, 'Helvetica Neue', Arial, sans-serif;"&gt;I am currently using the &lt;strong&gt;Rosetta Code implementation for LZW decompression (C++).&lt;/strong&gt;&amp;nbsp; This implementation requires numerical imput.&amp;nbsp; That is.. the input in it's compressed state is in numerical form.. a series of numbers.&amp;nbsp; &lt;strong&gt;My problem is this:&lt;/strong&gt;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="background-color: #e7e7e7; font-family: adobe-clean, 'Helvetica Neue', Arial, sans-serif;"&gt;I want to read the compressed LZW stream (compressed only in LZW and &lt;strong&gt;not&lt;/strong&gt;encoded in ASCII 85) into a buffer and that is then passed to the decompression algorithm for decompression.&amp;nbsp; I open the pdf in binary mode, read each character and convert it to an int and load each integer into the buffer .&amp;nbsp; Once the buffer (which is an int vector) is loaded, I pass this to the algorithm for decompression. &lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="background-color: #e7e7e7; font-family: adobe-clean, 'Helvetica Neue', Arial, sans-serif;"&gt;Unfortunately the data will not decompress.&amp;nbsp; I seem to get the same output as I put into it in a character form.&amp;nbsp;&amp;nbsp; I have included white space (noskipws) and also tried the opposite.&amp;nbsp; I have also tried (using bitwise shift operation) to create 12 bit chunks and then loading those into an int vector.&amp;nbsp; This isn't working either.&amp;nbsp;&amp;nbsp;&amp;nbsp; I'm thinking it has something to do with how I am reading the data in the first place.&amp;nbsp; What do all these little glyphs represent (in the compressed stream)&lt;strong&gt;?&lt;/strong&gt;&amp;nbsp; How do I go about reading compressed data into a buffer if the algorithm I am using requires numberical input common to LZW compression&lt;strong&gt;?&lt;/strong&gt;&amp;nbsp;&amp;nbsp; &lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="background-color: #e7e7e7; font-family: adobe-clean, 'Helvetica Neue', Arial, sans-serif;"&gt;Should I include white space&lt;strong&gt;?&amp;nbsp; &lt;/strong&gt;How should I read the compressed data&lt;strong&gt;?&lt;/strong&gt;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="background-color: #e7e7e7; font-family: adobe-clean, 'Helvetica Neue', Arial, sans-serif;"&gt;Any clues would be greatly appreciated.&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="background-color: #e7e7e7; font-family: adobe-clean, 'Helvetica Neue', Arial, sans-serif;"&gt;Thanks very much. &lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:ac5096d5-f446-4a30-a363-145c2d60f4d9] --&gt;</description>
      <pubDate>Sun, 08 Dec 2013 11:45:31 GMT</pubDate>
      <author>forums_noreply@adobe.com</author>
      <guid>https://forums.adobe.com/message/5911157?tstart=0#5911157</guid>
      <dc:date>2013-12-08T11:45:31Z</dc:date>
      <clearspace:dateToText>11 months 5 days ago</clearspace:dateToText>
      <clearspace:replyCount>1</clearspace:replyCount>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
  </channel>
</rss>

