[
https://issues.apache.org/jira/browse/CONFIGURATION-262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12488775#action_12488775
]
Emmanuel Bourg edited comment on CONFIGURATION-262 at 6/21/09 4:04 PM:
-----------------------------------------------------------------------
Binary plist parser from the Open Darwin project :
http://www.opensource.apple.com/source/CF/CF-476.18/CFBinaryPList.c
It details the structure of a binary plist file:
{code:xml}
HEADER
magic number ("bplist")
file format version
OBJECT TABLE
variable-sized objects
Object Formats (marker byte followed by additional info in some cases)
null 0000 0000
bool 0000 1000 // false
bool 0000 1001 // true
fill 0000 1111 // fill byte
int 0001 nnnn ... // # of bytes is 2^nnnn,
big-endian bytes
real 0010 nnnn ... // # of bytes is 2^nnnn,
big-endian bytes
date 0011 0011 ... // 8 byte float follows,
big-endian bytes
data 0100 nnnn [int] ... // nnnn is number of bytes
unless 1111 then int count follows, followed by bytes
string 0101 nnnn [int] ... // ASCII string, nnnn is # of
chars, else 1111 then int count, then bytes
string 0110 nnnn [int] ... // Unicode string, nnnn is # of
chars, else 1111 then int count, then big-endian 2-byte uint16_t
0111 xxxx // unused
uid 1000 nnnn ... // nnnn+1 is # of bytes
1001 xxxx // unused
array 1010 nnnn [int] objref* // nnnn is count, unless
'1111', then int count follows
1011 xxxx // unused
set 1100 nnnn [int] objref* // nnnn is count, unless
'1111', then int count follows
dict 1101 nnnn [int] keyref* objref* // nnnn is count,
unless '1111', then int count follows
1110 xxxx // unused
1111 xxxx // unused
OFFSET TABLE
list of ints, byte size of which is given in trailer
-- these are the byte offsets into the file
-- number of these is in the trailer
TRAILER
byte size of offset ints in offset table
byte size of object refs in arrays and dicts
number of offsets in offset table (also is number of objects)
element # in offset table which is top level object
offset table offset
{code}
was (Author: ebourg):
Binary plist parser from the Open Darwin project :
http://darwinsource.opendarwin.org/10.3/CF-299/Parsing.subproj/CFBinaryPList.c
It details the structure of a binary plist file.
> Binary property list format
> ---------------------------
>
> Key: CONFIGURATION-262
> URL: https://issues.apache.org/jira/browse/CONFIGURATION-262
> Project: Commons Configuration
> Issue Type: New Feature
> Components: Format
> Reporter: Emmanuel Bourg
> Priority: Minor
> Fix For: 2.x
>
> Attachments: CFBinaryPList.c
>
>
> With OS X 10.4 Apple introduced a variant of the plist format that is
> compressed using a binary format. That would be nice to support this format
> with a BinaryPropertyListConfiguration class.
> I haven't found the specification of this format.
> The plutil tool can be used to convert between xml and binary plist files.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.