Closed tagatac closed 3 days ago
It seems like this may be a dead end as gnustep does not seem to support NSArchiver format: https://mail.gnu.org/archive/html/discuss-gnustep/2005-09/msg00013.html
On 2005-09-07 04:13:57 +0100 Lloyd Dupont lloyd@nova-mind.com wrote:
I'm trying to port a MacOSX application to Windows. So far it has worked mostly well. However I'm trying to read one of our data file.
Which is an old format plist with some NSColor wich was stored as an NSData (on MacOSX) with [NSArchiver archivedDataWithRootObject: myColor];
Now I tryed to read it on Windows/GNUstep with myColor = (NSColor *) [NSUnarchiver unarchiveObjectWithData: aNSData];
and this fails and pops up a little GNUstep exception message box saying: Critical NSInternalInconsistencyException: Archive has wrong prefix
Now I wonder:
- is it that GNUstep's NSUnarchiver deosn't support MacOSX NSArchiver format?
Yes ... it's an undocumented proprietory binary format.
We aim to have binary compatility for keyed archives though (reverse engineering that was more practicable).
The relevant code is https://github.com/gnustep/libs-base/blob/1c5f581a46ed3e80aab1dbc7c8e33237da0ff4e9/Source/NSUnarchiver.m#L1807-L1816
At the moment compilation succeeds on Debian using
However, decoding fails with