2012-07-17から1日間の記事一覧
pastebin に貼られたHexDumpをファイルに書き戻したかった。BCAS関連の例のあれです。 str = open("./test.txt").read str.gsub(/\n/, "") list = str.split.map{|e| e.hex} f = open("out.rar", 'w') list.each{|e| f.putc e} #バイナリ書き込みは putcを使…
pastebin に貼られたHexDumpをファイルに書き戻したかった。BCAS関連の例のあれです。 str = open("./test.txt").read str.gsub(/\n/, "") list = str.split.map{|e| e.hex} f = open("out.rar", 'w') list.each{|e| f.putc e} #バイナリ書き込みは putcを使…