<div dir="ltr">It turns out that there is no easy answer to my question. There is no way to chunk a binary file using line ending characters because of the inherent nature of binary data which can contain the line end hex values as part of the stream of arbitrary stream. PDF files contain an xref table to all of the objects in the file. I have managed to create classes in my framework which will extract that data into a usable object which I can use to extract the data. Using "self findTokens: ( Character cr  asString,  Character lf asString)" is useful in the  areas of a PDF file which do not contain binary data, and is necessary because the line end values used in a PDF are dependent on the default values of the operating system the file was created on,<div><br></div><div>Thanks again for your interest in my question. </div><div><br></div><div>Jrm<br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 25, 2017 at 3:00 AM, John-Reed Maffeo <span dir="ltr"><<a href="mailto:jrmaffeo@gmail.com" target="_blank">jrmaffeo@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Is there an existing method that will tokenize/chunk(?) data from a file using  CR/LF? The use case is to decompose a file into PDF objects defined as strings are strings terminated by CR/LF. (if there is an existing framework/project available, I have not found it, just dead ends :-(<div><br></div><div><div>I have been exploring in #String and #ByteString and this is all I have found that is close to what I need.</div><div><br></div><div>"Finds first occurance of #Sting"</div><div>self findString: ( Character cr  asString,  Character lf asString).</div><div>"Breaks at either token value"</div><div>self findTokens: ( Character cr  asString,  Character lf asString)</div></div><div><br></div><div>I have tried poking around in #MultiByteFileStream, but  keep running into errors.</div><div><br></div><div>If there is no existing method, any suggestions how to write a new one? My naive approach is to scan for CR and then peek for LF keeping track of my pointers and using them to identify the CR/LF delimited substrings; or iterate through contents using #findString:<br></div><div><br></div><div>TIA, jrm</div><div><br></div><div>-----</div><div><div>Image</div><div>-----</div><div>C:\Smalltalk\Squeak5.1-16549-<wbr>64bit-201608180858-Windows\<wbr>Squeak5.1-16549-64bit-<wbr>201608180858-Windows\Squeak5.<wbr>1-16549-64bit.1.image</div><div>Squeak5.1</div><div>latest update: #16549</div><div>Current Change Set: PDFPlayground</div><div>Image format 68021 (64 bit)</div><div><br></div><div>Operating System Details</div><div>------------------------</div><div>Operating System: Windows 7 Professional (Build 7601 Service Pack 1)</div><div><span style="white-space:pre-wrap">       </span>Registered Owner: T530</div><div><span style="white-space:pre-wrap">   </span>Registered Company: </div><div><span style="white-space:pre-wrap">    </span>SP major version: 1</div><div><span style="white-space:pre-wrap">      </span>SP minor version: 0</div><div><span style="white-space:pre-wrap">      </span>Suite mask: 100</div><div><span style="white-space:pre-wrap">  </span>Product type: 1</div></div><div><br></div></div>
</blockquote></div><br></div></div></div>