Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
lib
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Bencoder

Build Status

An elixir bencoding package

It's intended for the yolandi torrent client

Beware

That's a learning exercise for me in elixir/erlang, so the code is still not clean and non idiomatic

Bencode format supports 4 types of data: numbers, dictionaries and lists. Bencoder uses elixir's Integer, Map, List and BitString.

Examples:

Bencoder.encode(2) # "i2e"
Bencoder.encode([4, 202]) # "li4ei202ee"
Bencoder.decode("4:life") # "life"
Bencoder.decode("d4:lifei42ee") # %{"life" => 42}
Bencoder.decode("i42e") # 42
Bencoder.decode("l1:~e") # ["~"]

Install

Add to your mix.exs deps

{:bencoder, "~> 0.0.7"}

Copyright

Copyright (c) 2014 Alexander Ivanov. See LICENSE for further details

About

a library to handle bencode in elixir

Resources

License

Releases

No releases published

Languages

You can’t perform that action at this time.