Expand description
Contains logic and data structures used to parse and deserialize NSKeyedArchiver property list files into native Rust data structures.
The main entry point is parse_ns_keyed_archiver(). For normal property lists, use plist_as_dictionary().
§Overview
The NSKeyedArchiver format is a property list-based serialization protocol used by Apple’s Foundation framework.
It stores object graphs in a keyed format, allowing for more flexible deserialization and better handling of
object references compared to the older typedstream format.
§Origin
Introduced in Mac OS X 10.2 as part of the Foundation framework, NSKeyedArchiver replaced NSArchiver
(typedstream) system as Apple’s primary object serialization mechanism.
§Features
- Pure Rust implementation for efficient and safe deserialization
- Support for both XML and binary property list formats
- No dependencies on Apple frameworks
- Robust error handling for malformed or invalid archives
Functions§
- extract_
array_ key - Extract an array from a specific key in a collection
- extract_
bytes_ key - Extract bytes from a specific key in a collection
- extract_
dict_ idx - Extract a dictionary from a specific index in a collection
- extract_
dictionary - Extract a dictionary from a specific key in a collection
- extract_
int_ key - Extract an int from a specific key in a collection
- extract_
string_ key - Extract an &str from a specific key in a collection
- get_
bool_ from_ dict - Extract a bool from a key-value pair that looks like
{key: true} - get_
float_ from_ nested_ dict - Extract a float from a key-value pair that looks like
{key: {key: 1.2}} - get_
owned_ string_ from_ dict - Extract an owned string from a key-value pair that looks like
{key: String("value")} - get_
string_ from_ dict - Extract a string from a key-value pair that looks like
{key: String("value")} - get_
string_ from_ nested_ dict - Extract a string from a key-value pair that looks like
{key: {key: String("value")}} - get_
value_ from_ dict - Extract an inner dict from a key-value pair that looks like
{key: {key2: val}} - parse_
ns_ keyed_ archiver - Serialize a message’s
payload_dataBLOB in theNSKeyedArchiverformat to aDictionarythat follows the references in the XML document’s UID pointers. First, we find the root of the document, then walk the structure, promoting values to the places where their pointers are stored. - plist_
as_ dictionary - Extract a dictionary from table
plistdata.