开发者

Cocoa - NSDictionary from zipped plist?

Mac OS X 10.5 compatibility required.

I have a (large, complex) NSDictionary I'm writing out as a plist file.

For file size reasons, I want to zip the file, and later read it in again from the zip archive.

(I can also save it as as a binary plist, to save some开发者_开发技巧 space. But not enough for my purposes.)

The zipping/unzipping part is easy, thanks to the NSData category provided at:

http://www.cocoadev.com/index.pl?NSDataCategory

This gives me an NSData object from the zip archive.

Q. Is there a safe/auto-magic/approved way of taking that unzipped NSData object and combobulating it in to a valid NSDictionary?

Thanks.


See the NSPropertyListSerialization Class Reference.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜