Again, I have nothing against people defining a YAML based binary format, and that may have advantages for some usages. It is just that it wouldn't be YAML :-) Protobuf is interesting and I always wondered if it were possible to define a "sensible" YAML <-> Protobuf converter.

Staying as close to YAML/JSON as possible, then using something like {dictionary:{&1 text1,&q1 text2},payload:{ *1: ...,*q1: ...}} you can reduce the size of repeated keys (and, for that matter, values) to a few characters, without resorting to zip. Doing something like the DLE extension I described you can embed binary blobs without base64 encoding. The result should be pretty compact and would have a trivial conversion to/from standard YAML.

That said, zip isn't a very expensive operation these days, even for consumer devices - of course I don't know what your usage is.

Have fun,

    Oren Ben-Kiki

On Tue, Jun 14, 2011 at 3:20 AM, Paul Lambert <paul@marvell.com> wrote:

Ok - the YAML community and binary encoding do not appear to be compatible.  Too bad your world view is so limited.  Take a look a protobuf as an example of combining human readable and binary encodings if you want to see a worked hybrid.

The notion I was presenting was not that binary was the primary representation - but that the human readable and a binary encoding could coexist.  Note that I'mm working with vendors building consumer devices, sensors, wireless protocols .. so the efficiency is quite important ... and zip is not a viable option.

Paul


> -----Original Message-----
> From: Steve Schafer [mailto:steve@fenestra.com]
> Sent: Monday, June 13, 2011 12:40 PM
> To: Paul Lambert
> Cc: yaml-core@lists.sourceforge.net
> Subject: Re: [Yaml-core] Reg: PyYAML grammar
>
> On Mon, 13 Jun 2011 11:45:54 -0700, you wrote:
>
> >    x0506123456789AB                        (total length 8 bytes)
>
> This is precisely the kind of thing that YAML was designed to
> eliminate!
> Look at the top-priority goal of the YAML standard: "YAML is easily
> readable by humans." Readability trumps _everything_.
>
> Bits are cheap. Unless you have a truly compelling reason to worry
> about
> the size of your data (e.g., you're working with an embedded CPU that
> has only a few kB of RAM), forget about this kind of compression. It
> will only come back to bite you in the butt later.
>
> And if you really do have a reason to worry about the size of your
> data,
> you probably shouldn't be using YAML.
>
> -Steve Schafer

------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Yaml-core mailing list
Yaml-core@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/yaml-core