On 15 Apr 2008, at 16:06, Navneet Kumar wrote:

ok,
so if i generate a header NSData object and write that to file, and then then write the larger NSData object,
how will i read one NSData after the another.
How will i know what length should I read.

excuse me if this sounds very newbie to you.

Well it depends on how you generate it. You're probably right that it's a bit of an assumption that using a keyed archiver will result in the same sized NSData every time (or indeed that there will be any particular limit), so perhaps the OP is best served here by encoding the lengths manually in an NSMutableData and then writing that (since at least then the header size could be fixed).

Endianness problems, of course, would need to be dealt with.

Kind regards,

Alastair.

--
http://alastairs-place.net


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to