[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] bencode-2.0
- From: Moritz Wilhelmy <moritz@...>
- Date: Tue, 27 Nov 2012 19:06:27 +0100
Hi,
On Tue, Nov 27, 2012 at 15:54:02 -0200, Elias Barrionovo wrote:
> Well, I have no idea what bencode is or does and your email doesn't
> provide any info with that. Also, it would be nice to have a link for
> your project and not just for the rockspec. ^^
My apologies!
I was way too excited to finally boot it out of the door that I omitted
this kind of information.
Bencoding ("Bittorrent encoding") is a relatively simple data
serialisation format. It nicely maps almost 1:1 to lua's data
structures. lua-bencode therefore (as you might guess) converts bencoded
data to lua data structures and the other way around.
An example on how to use the library is in examples/dumptorrent.lua and
the testsuite. Perhaps I could add the lack of documentation to my list
of issues to address in future. So far I didn't, because the only two
functions exported by the library - namely encode and decode - do the
obvious according to their name.
In the examples directory on bitbucket, there's a also a half-baked
bittorrent tracker (backed by lhf's lgdbm and cgi, so you can guess it's
not optimised for performance but meant as proof of concept
implementation), which is not included in this release because it does
not yet work. I wanted to resolve the negative number decoding bug,
though, so I decided it would be time for a new release without it.
Project homepage: http://bitbucket.org/wilhelmy/lua-bencode/
Best regards,
Moritz