libplist  2.2.0
API Documentation - Return to Homepage

◆ plist_is_binary()

int plist_is_binary ( const char *  plist_data,
uint32_t  length 
)

Test if in-memory plist data is binary or XML This method will look at the first bytes of plist_data to determine if plist_data contains a binary or XML plist.

This method is not validating the whole memory buffer to check if the content is truly a plist, it's only using some heuristic on the first few bytes of plist_data.

Parameters
plist_dataa pointer to the memory buffer containing plist data.
lengthlength of the buffer to read.
Returns
1 if the buffer is a binary plist, 0 otherwise.