Recently I want to create binary data from text file with Ruby.
Ruby has powerful regexp and convenient methods to be equip.
Therefore I try to create file and to store binary data.
But, I wonder how to store binary data!
Ruby provides the way to store for file is only text format.
I am in trouble.
I study a reference of Ruby.
It describes following.
Example code is next.
file << [10].pack("i")
 


No comments:
Post a Comment