Advertisement
Guest User

hextobin

a guest
Nov 25th, 2012
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.16 KB | None | 0 0
  1. #Text Hex to Binary Hex conversion
  2. hexcode = IO.binread("hex.txt")
  3. IO.binwrite("output.bin",hexcode.split("-").each.inject("") { |out,n| out << n.to_i(16).chr })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement