From: Bazsl Date: 2007-10-15T08:46:14+09:00 Subject: Piping binary files 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.