lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


It was thus said that the Great Daurnimator once stated:
> On 5 October 2016 at 14:07, Sean Conner <sean@conman.org> wrote:
> 
> > (Let's try this again)
> >
> >   I'm proud to announce the release of org.conman.cbor 1.2.0 [5], the most
> > comprehensive CBOR module in the Lua universe.  This is the full CBOR
> > monty---all items from RFC-7049 [1] and all registered extentions from the
> > IANA [2].
> >
> >   This version adds support for RAINS [6] tagged CBOR data.
> >
> >   Available via LuaRocks [3] and on github [4].
> >
> >   -spc (Download and enjoy)
> >
> > [1]     http://tools.ietf.org/html/rfc7049
> >
> > [2]     http://www.iana.org/assignments/cbor-tags/cbor-tags.xhtml
> >
> > [3]     https://luarocks.org/modules/spc476/org.conman.cbor
> >
> > [4]     https://github.com/spc476/CBOR
> >
> > [5]     I still had ... some issues updating everything to 1.1.2.
> >         Sigh.
> >
> > [6]     https://britram.github.io/rains-prototype/
> >
> >
> How do you compare yourself to zash's cbor library?
> https://www.zash.se/lua-cbor.html

  More comprehensive to be sure.  It's a similar API (cbor.encode(),
cbor.decode(); I'm missing cbor.decode_file()) but I deal with more tagged
types than zash's code does.  I also pack floats to a minimum encoding (if
the double can be stored as a half [1], I'll store it as a half; if a
single, then a single).  I can also deal with circular references (optional
at the API level) which I don't think many encoding schemes can deal with. I
can also encode string references, again, an optional part of the full API.

  And if you don't need the full support for tags, there is a smaller
implementation available as well (org.conman.cbor_s vs. org.conman.cbor).  

> I'll note that yours isn't mentioned on http://cbor.io/impls.html :)

  Yeah, I need to get a round toit.  Sigh.  

  -spc (A CBOR 'null' and 'undefined' return a nil, but that can be
	overridden if need be ... )

[1]	https://en.wikipedia.org/wiki/Half-precision_floating-point_format