2 ms·
To summarise, it's a .zip file containing a binary serialisation of XML, which then contains the base64'd raw coordinates... Reminds me of this (it gets even b
by userbinator 9y ago
To summarise, it's a .zip file containing a binary serialisation of XML, which then contains the base64'd raw coordinates...
Reminds me of this (it gets even better in the comments):
https://thedailywtf.com/articles/XXL-XML https://thedailywtf.com/articles/XXL-XML
Nothing in here was really complicated – it was just some existing standard formats (zip! apple plist! an array of floats!) combined together in a pretty simple way.
It's rather telling that wrapping points in 3 layers of encodings is considered "pretty simple", almost the norm today, when years ago doing such a thing would probably elicit reactions more towards WTF.
- derefr 9y ago• Very likely the files are only .zip files for network portability, and when in their native environment (iOS?) they’re unzipped document bundles (see e.g. the RTFd format) • Likely this file isn’t literally a PList, but the output of a data storage framework (e.g. CoreData) that uses PLists as one possible backend. In the code, it just looks like adding annotations to native data structures to make them “storable” within a database-like object. • Only the text-formatted PLists contain base64’ed binary data. The binary-formatted PLists just contain length-prefixed binary data. There isn’t the “binary in base64 in XML in binary” that you’re imagining.
- jvns 9y agothanks for this!! I've never worked with iOS so I was definitely fumbling in the dark. the CoreData hypothesis explains why the PList file looks like a huge weird unstructured array! So in the code there's just some object with all the data in it and then CoreData serializes that object? This explains the feeling throughout of "this doesn't feel like a format the app developer designed".
- theamk 9y agoIt's just the opposite -- years ago, it was much, much worse. I remember trying to reverse engineer older Symbian notes format -- it was a custom datastore format containing various binary "chunks", each with semi-custom compression. I had to recombine multiple chunks just to get a formatted text, and I still had occasional failure. Or look at other vector format -- like CGM, first made in 1987. It has its own serialization mechanism, it's own model (file->body->figure->segment), and 3 compression types specifically designed for it. Look at http://standards.iso.org/ittf/PubliclyAvailableStandards/c032380_ISO_IEC_8632-3_1999(E).zip http://standards.iso.org/ittf/PubliclyAvailableStandards/c03... -- do you want this today? I'd that zip of plist of float anytime over that.