[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] bencode-2.1.0
- From: Moritz Wilhelmy <moritz@...>
- Date: Sat, 11 Jan 2014 23:00:42 +0100
Hi Andrew,
On Sat, Jan 11, 2014 at 15:21:24 -0600, Andrew Starks wrote:
> On Saturday, January 11, 2014, Moritz Wilhelmy wrote:
>
> > Hello,
> >
> > I'm pleased to announce the release of bencode-2.1.0, which fixes a
> > short string decoding bug where an error would not be detected with
> > strings that were one character short, i.e. "4:abc" returns nil and an
> > error message now, rather than "abc".
> >
> > Thanks to Jorge "xopxe" Visca for finding and fixing this bug.
> >
> > There is an updated rockspeck here, please add it to luarocks:
> >
> > https://bitbucket.org/wilhelmy/lua-bencode/raw/7d922d6926c5ae18e562dce53adfab4be5daba58/bencode.rockspec
> >
> > Distribution ZIP archive and tarball can be found here:
> > https://bitbucket.org/wilhelmy/lua-bencode/downloads/lua-bencode-2.1.0.zip
> >
> > https://bitbucket.org/wilhelmy/lua-bencode/downloads/lua-bencode-2.1.0.tar.gz
> >
> > as well as my own site:
> > http://ftp.barfooze.de/pub/lua-bencode/lua-bencode-2.1.0.zip
> > http://ftp.barfooze.de/pub/lua-bencode/lua-bencode-2.1.0.tar.gz
> >
> > And should have the following SHA-512 checksums:
> > 55ceb1ff218839b52367339633efe040a186dd1fc432e4ce5b6f0fff7c329aae
> > lua-bencode-2.1.0.zip
> > 4624f33ff026bc62990a323ee4953e42d68430c38a1a4726c9cfd77c085b1422
> > lua-bencode-2.1.0.tar.gz
> >
> >
> > Best regards,
> >
> > Moritz
> >
> > Could you please take a second to describe bencode? Thanks!
>
> -Andrew
This question gets asked a lot, I think so far I had to explain what it
does each time I make a release :-)
Excuse my laziness, but attached is a repost of my last explaination
about bencode:
> 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/
The tracker is again not included because I haven't bothered to work on
it at all over the last year.
Theoretically, you can use bencode to serialise any lua data structures
as long as they don't contain "special" things like userdata or self-
referencing tables (which lua-bencode explicitely does not support).
Best regards,
Moritz
--
Sent from my PDP-11 via UUCP