OK, it's gradually making sense, but i still have some questions. I started trying to do something like this a while back -- storing it all in one file, then loading it, but I think after that is where I went wrong. I created an array out of the contents and used it searched it way. I then decided to split it into separate files to make the searching faster.
I am now trying to do what you are recommending, and I have the file loaded with: NSString *filePath = [[NSBundle mainBundle] pathForResource:@"dictionary" ofType:@"txt"]; NSData *myData = [NSData dataWithContentsOfFile:filePath]; My questions are now about how to store the contents, because I don't think a nsdata or converting it to an array is what I want. Googling with keywords I've gathered from your emails have given me hints about using mmap, but I've finding very little info on it or how to use it. Is that what I should be trying to figure out? Searching "shared prefix matching" and similar keywords aren't turning up much either, so i'm a little stuck. I'd appreciate another boost or two if you wouldn't mind. As usual, thanks a lot! On Sun, Apr 12, 2009 at 1:30 PM, Kyle Sluder <kyle.slu...@gmail.com> wrote: > On Sun, Apr 12, 2009 at 1:19 PM, Miles <vardpeng...@gmail.com> wrote: > > In the meantime if you have a good link handy about how to do this I > would > > appreciate it. > > If you put something in the Resources directory of the app bundle, you > can use NSBundle's -pathForResource:ofType: and related methods to get > their paths. Since you're working on iPhone, you need to be conscious > of the tradeoffs of compressing resources on-disk (and taking the > processor time to decompress them, either at startup or on load) > versus leaving them uncompressed (and consequently consuming more disk > space). Making them static arrays, however, is probably not a good > idea. > > --Kyle Sluder > _______________________________________________ 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 arch...@mail-archive.com