Hi,

From: "Boris "BXS" Schulz" <bxs / hadiko.de>
> [mmap]
> 
> sounds like a good idea, except, I am a WindowsXP user, and it says 
> something about beeing only for unix on 
> http://raa.ruby-lang.org/list.rhtml?name=mmap
> So i'll have to stick with the other guys advice.

By the way, if you like, you can define [] operators for
File class, like: 

class File
  def [](pos)
    seek(pos)
    read(1)
  end
  def []=(pos, str)
    seek(pos)
    write(str)
  end
end

Then you can:

>> f = File.open("zzz.wav", "r+b")
=> #<File:zzz.wav>

# wav files start out with 'RIFF'
>> f[0]
=> "R"
>> f[1]
=> "I"
>> f[2]
=> "F"
>> f[3]
=> "F"

# let's write a 'Z' in place of the 'R'
>> f[0] = "Z"
=> "Z"

>> f[0]
=> "Z"
>> f[1]
=> "I"
>> f[2]
=> "F"

# let's write the string 'ZOOM' in place of the 'RIFF'
>> f[0] = "ZOOM"
=> "ZOOM"

>> f[0]
=> "Z"
>> f[1]
=> "O"
>> f[2]
=> "O"
>> f[3]
=> "M"


Hope this helps,

Bill