Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.dougwise.org!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!usenet-fr.net!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!feeds.phibee-telecom.net!talisker.lacave.net!lacave.net!not-for-mail From: 7stud -- Newsgroups: comp.lang.ruby Subject: Re: Binary file: SAT Date: Fri, 22 Apr 2011 13:49:04 -0500 Organization: Service de news de lacave.net Lines: 15 Message-ID: References: <4fa8adc3b92c44287a399f6cb1aab3ff@ruby-forum.com> <2cddb6943b03d69eca28d3dffeba1374@ruby-forum.com> NNTP-Posting-Host: bristol.highgroove.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: talisker.lacave.net 1303498409 30079 65.111.164.187 (22 Apr 2011 18:53:29 GMT) X-Complaints-To: abuse@lacave.net NNTP-Posting-Date: Fri, 22 Apr 2011 18:53:29 +0000 (UTC) In-Reply-To: X-Received-From: This message has been automatically forwarded from the ruby-talk mailing list by a gateway at comp.lang.ruby. If it is SPAM, it did not originate at comp.lang.ruby. Please report the original sender, and not us. Thanks! For more details about this gateway, please visit: http://blog.grayproductions.net/categories/the_gateway X-Mail-Count: 382075 X-Ml-Name: ruby-talk X-Rubymirror: Yes X-Ruby-Talk: Xref: x330-a1.tempe.blueboxinc.net comp.lang.ruby:3387 Alessandro Barracco wrote in post #994473: >> Do not think of binary files as containing lines. A binary file is a >> long continuous sequence of integers contained in a varying number of >> bytes. > > That's OK. but the file I need to parse is a special txt file (DXF > format) that consist of couple-of-line: Binary files do not have lines. Until you can understand that, you cannot proceed. Binary files consist of blocks of bytes. Each block contains some data. Each block consists of a different number of bytes. -- Posted via http://www.ruby-forum.com/.