Ruby gem for Bencode data serialization.
- Install
require "bencoder"Bencoder.decode("l3:foo3:bare") # => ["foo", "bar"]Bencoder.encode({year: 1984}) # => "d4:yeari1984ee"- Also you can apply monkey patches and use method
to_bencodeon an object - You can parse torrent files with it; just don't forget to open them in a binary mode
- Download or clone
- Run
rake install, or install manually withgem build/gem install - Tests can be run with
rake test - Documentations can be created with
rake docsorrdoc lib/*.rb