C
Collin VanDyck
Hello -- I'm trying to write out specific byte sequences over the
wire / to a file / etc. Let's say for example that I wanted to write
out
99 111 108 108 105 110
as a simple, six byte sequence to a file. In Java, I might use the
byte primitive, but it seems that in Ruby you have Fixnum and then a
Float for fractions. If I simply create a Fixnum using the 99
literal, I think that that will create more than an 8-bit sequence
when I write out to the file.
Any ideas on how to do this?
wire / to a file / etc. Let's say for example that I wanted to write
out
99 111 108 108 105 110
as a simple, six byte sequence to a file. In Java, I might use the
byte primitive, but it seems that in Ruby you have Fixnum and then a
Float for fractions. If I simply create a Fixnum using the 99
literal, I think that that will create more than an 8-bit sequence
when I write out to the file.
Any ideas on how to do this?