by gilgoomesh · 13y ago · 0 comments
And not the best implementation out there since it lacks the redundant key/value elimination that more compact serialization formats use. Consider an array of maps where each of the maps have the same keys. By eliminating the redundant keys (have each subsequent occurrence simply reference earlier occurrences) you can halve the encoded data size relative to implementations without redundant elimination.
It also lacks a canonical string encoding. All strings are saved as raw binary data making it terrible for data interchange between environments with different string encodings.
C/C++/Objective-C users have many better options than this. In Mac/iOS/Cocoa/CoreFoundation, you can use Apple's Binary PList which is open sourced here:
http://www.opensource.apple.com/source/CF/CF-476.10/CFBinaryPList.c
In non-Apple C/C++ environments, you can use the open source implementation of Apple's PList here: https://github.com/JonathanBeck/libplistObviously, further GZIPing the result will always make it more compact but GZIP on uniqued result is likely to result in a more compact representation than GZIP on the non-uniqued result.