[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Piping binary files

Bazsl

10/14/2007 11:46:00 PM

I want to pipe a binary file through a Ruby script. I have tried

while (b = STDIN.getc)
STDOUT.putc(b)
end

and it works with text files but corrupts an mp3 file. STDIN.binmode did
not help. I can't find read and write methods of the IO class that work
with binary files. What am I missing? Thanks.

3 Answers

Bazsl

10/15/2007 12:01:00 AM

0

Bazsl wrote:
> I want to pipe a binary file through a Ruby script. I have tried
>
> while (b = STDIN.getc)
> STDOUT.putc(b)
> end
>
> and it works with text files but corrupts an mp3 file. STDIN.binmode
> did not help. I can't find read and write methods of the IO class that
> work with binary files. What am I missing? Thanks.
>
>
>
Ignore my question. I made a dumb mistake.

Carolina Reb

2/19/2012 11:21:00 AM

0

On Feb 19, 6:06 am, The Peeler <slapp...@themoronicRevd.invalid>
wrote:
> when will you kill your first Jew?
>


You seem to be worried about it, Kikeboy. Good.
Worry some more.

The Peeler

2/19/2012 11:48:00 AM

0

On Sun, 19 Feb 2012 03:21:13 -0800 (PST), Caroloony Reb, the subnormal moron
and attested schizo from the States, wrote:

>> when will you kill your first Jew?
>>
>
> You seem to be worried about it, Kikeboy. Good.
> Worry some more.

Yes, I'm worried! LOL So, when will you kill your first Jew, you hilarious
dumb schizo?

--
DoD about our resident schizo:
"You have nothing better to do with your time than mouthing off on usenet on
what you would like to do with people you don't even know and spew bigotry."
MID: <132d2742-c469-40ec-a189-14362512151d@f30g2000yqh.googlegroups.com>