will's stuff
Tuesday, November 6, 2012
reading binary files in ruby
Let's say you have a binary file filled with a bunch of doubles:
File.open("file_name","r") do |file| while !file.eof? puts file.read(8).unpack('D')[0] end end
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment