public
Description: Ruby bindings for the bencode data serialization format
Homepage:
Clone URL: git://github.com/dasch/ruby-bencode-bindings.git
name age message
file .gitignore Tue Oct 06 10:03:53 -0700 2009 Ignore gem files [dasch]
file LICENSE Mon Mar 02 12:40:49 -0800 2009 Add MIT license [dasch]
file README.md Tue Oct 06 10:05:55 -0700 2009 Add yours truly to the contributor list [dasch]
file Rakefile Thu Jul 17 16:16:09 -0700 2008 Added RDoc documentation task. [dasch]
file bencode.gemspec Tue Oct 06 10:04:34 -0700 2009 Bump version number [dasch]
directory lib/ Sun May 17 13:11:35 -0700 2009 Patched load_file to work properly under Windows [mikehodgson]
directory test/ Thu Jul 17 15:55:30 -0700 2008 Added ruby-bencode source files. [dasch]
README.md

Ruby bencode binding

This is a simple library for reading and writing bencoded data.

What is bencode?

Bencode is a simple data serialization format used by the popular BitTorrent P2P file sharing system.

It contains only four data types, namely:

  • byte strings
  • integers
  • lists
  • dictionaries

Examples

"foo bar".bencode                   # => "7:foo bar"
42.bencode                          # => "i42e"
[1, 2, 3].bencode                   # => "li1ei2ei3ee"
{"foo" => 1, "bar" => -10}.bencode  # => "d3:bari-10e3:fooi1ee"

License

Released under the MIT license.

Contributors

  • Daniel Schierbeck
  • Mike Hodgson