libplist  2.7.0
API Documentation - Return to Homepage

◆ plist_is_binary()

PLIST_API int plist_is_binary ( const char *  plist_data,
uint32_t  length 
)

Test if in-memory plist data is in binary format.

This function will look at the first bytes of plist_data to determine if it supposedly contains a binary plist.

Note
The function is not validating the whole memory buffer to check if the content is truly a plist, it is 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.