Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!feeds.phibee-telecom.net!talisker.lacave.net!lacave.net!not-for-mail From: 7stud -- Newsgroups: comp.lang.ruby Subject: Re: splitting binary data Date: Thu, 21 Apr 2011 12:18:07 -0500 Organization: Service de news de lacave.net Lines: 19 Message-ID: References: <7568e966e6a587834b24d6893c5b6c41@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 1303406316 68856 65.111.164.187 (21 Apr 2011 17:18:36 GMT) X-Complaints-To: abuse@lacave.net NNTP-Posting-Date: Thu, 21 Apr 2011 17:18:36 +0000 (UTC) In-Reply-To: <7568e966e6a587834b24d6893c5b6c41@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: 382010 X-Ml-Name: ruby-talk X-Rubymirror: Yes X-Ruby-Talk: Xref: x330-a1.tempe.blueboxinc.net comp.lang.ruby:3323 hroyd hroyd wrote in post #994257: > > Thanks for your help > Sure. Also, note that ruby lets you do this: pattern = "\xFF" * 16 p pattern --output:-- "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF" ..so that you don't have to write that out by hand. -- Posted via http://www.ruby-forum.com/.