Skip to content

Instantly share code, notes, and snippets.

@hirataya
Created February 17, 2012 12:17
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save hirataya/1853033 to your computer and use it in GitHub Desktop.
Save hirataya/1853033 to your computer and use it in GitHub Desktop.
rvdata2 dumper
#! /usr/bin/env ruby
require "zlib"
fp = File.open(ARGV.shift, "r:binary")
Marshal.load(fp.read).each.with_index do |cont, index|
id, name, code = cont
code = Zlib::Inflate.inflate(code).force_encoding("utf-8")
puts "#"*79 if 0 < index
printf "[%s] (%d)\n%s", name, id, code
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment