Path: csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!weretis.net!feeder5.news.weretis.net!talisker.lacave.net!lacave.net!not-for-mail From: 7stud -- Newsgroups: comp.lang.ruby Subject: Re: Binary file: SAT Date: Thu, 21 Apr 2011 12:25:28 -0500 Organization: Service de news de lacave.net Lines: 22 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 1303406745 69969 65.111.164.187 (21 Apr 2011 17:25:45 GMT) X-Complaints-To: abuse@lacave.net NNTP-Posting-Date: Thu, 21 Apr 2011 17:25:45 +0000 (UTC) In-Reply-To: <2cddb6943b03d69eca28d3dffeba1374@ruby-forum.com> 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: 382011 X-Ml-Name: ruby-talk X-Rubymirror: Yes X-Ruby-Talk: Xref: x330-a1.tempe.blueboxinc.net comp.lang.ruby:3324 Alessandro Barracco wrote in post #994230: > Thanx you all. I'm beginning to understand a bit.... > > These are the first 20 lines of the binary-block in the file: > Binary files aren't human readable, i.e. they look like nonsense. > > It consists of pairs of lines: the first is a code (always 1), the > second is the data. Do not think of binary files as containing lines. A binary file is a long continuous sequence of bytes. And you have to know exactly what each byte means to read the data. For instance, you have to know that the first 4 bytes is the count of banks in New York, and the next byte is a letter, and the next 2 bytes is the year, and the next 2 bytes is the month, etc. -- Posted via http://www.ruby-forum.com/.