Subject: binary plist support
To: None <tech-kern@netbsd.org>
From: Jachym Holecek <freza@NetBSD.org>
List: tech-kern
Date: 10/06/2007 22:25:03
Hello,

I've implemented ${subj} for proplib:

  ftp://ftp.netbsd.org/pub/NetBSD/misc/freza/bplist-2007-10-06.diff

The binary encoding, which is rather size-efficient and supposedly very
fast as well (but I don't have numbers yet), is basically Apple bplist
format. But because Apple doesn't distinguish signed integers vs. unsigned,
the format differs slightly and uses different version number to avoid
confusion.

On the API side, binary encoding is created/parsed by the following
functions:

  bool prop_dictionary_binary_externalize(prop_dictionary_t, uint8_t **,
      size_t *);
  bool prop_dictionary_binary_externalize_to_file(prop_dictionary_t,
      const char *);
  prop_dictionary_t prop_dictionary_binary_internalize(uint8_t *, size_t);


and symetrically for prop_array* -- see the diff above for more
documentation.

Comments? I'd like to commit this ASAP as it's a vital prerequisity for
merging my SoC project.

	-- Jachym