Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

NSArchiver/NSUnarchiver portability

0 views
Skip to first unread message

Clark S. Cox III

unread,
Aug 24, 2000, 3:00:00 AM8/24/00
to
I'm writing a role-playing-game (on MacOSX), and I am using
NSArchiver to save my game objects to disk. I was wondering if the
GNUStep implimentation of NSArchiver/NSUnarchiver use the same file
format. I need to know this because I am considering porting it to
GNUStep as well.
i.e. If I were to save a bunch of classes to disk with NSArchiver on
MacOSX, would the implementation of NSUnarchiver under GNUStep be able
to read that file (and vice-versa)?

--
Clark S. Cox, III
clar...@yahoo.com

If youąre not part of the solution, youąre part of the precipitate.
-- Steven Wright

Adam Fedor

unread,
Sep 8, 2000, 7:01:51 PM9/8/00
to
"Clark S. Cox III" wrote:
>
> I'm writing a role-playing-game (on MacOSX), and I am using
> NSArchiver to save my game objects to disk. I was wondering if the
> GNUStep implimentation of NSArchiver/NSUnarchiver use the same file
> format. I need to know this because I am considering porting it to
> GNUStep as well.
> i.e. If I were to save a bunch of classes to disk with NSArchiver on
> MacOSX, would the implementation of NSUnarchiver under GNUStep be able
> to read that file (and vice-versa)?
>

Sorry if this didn't get answered sooner. newsgroups don't seem to get
mirrored to the mailing lists (which is what most people read).

The Archiver formats aren't compatible. They are binary formats, and in
fact, wouldn't be compatible between different machines in any case (if
MacOSX ran on different machines) due to endiness and type size
differences.

There are a few options you have:

Store the data as a property list (if all you use are Dictionaries,
Arrays and Strings)

Define your own format (and perhaps implement your own archiver
classes to store them).

Apple is transitioning to XML format. I don't know if there is any
information on using it yet. Plus GNUstep doesn't implement it yet (but
will).

ric...@brainstorm.co.uk

unread,
Sep 10, 2000, 12:24:32 AM9/10/00
to
On Fri, 08 Sep 2000 17:01:51 -0600, fe...@doc.com wrote:
> The Archiver formats aren't compatible. They are binary formats, and in
> fact, wouldn't be compatible between different machines in any case (if
> MacOSX ran on different machines) due to endiness and type size
> differences.

Though the GNUstep archive format is portable between machines of different
architectures.

> There are a few options you have:
>
> Store the data as a property list (if all you use are Dictionaries,
> Arrays and Strings)

Text property-lists of course - serialized property-lists are (like archives)
not portable between MacOS-X and GNUstep, though they are portable between
different machine architectures running GNUstep.

> Define your own format (and perhaps implement your own archiver
> classes to store them).
>
> Apple is transitioning to XML format. I don't know if there is any
> information on using it yet. Plus GNUstep doesn't implement it yet (but
> will).

As far as I know, MacOS-X has changed the text format of property-lists to
use XML already, so currently even text based property-lists are no longer
portable!
I hope to update gstep-base to read MacOS-X property-lists in XML format as
well as OpenStep property-lists real soon now (perhaps on Monday).

0 new messages