a set of text files may work well. You can:
- divide them into several files (for example, by character range).
- order of pairs (e.g. by character number)
- and quick / easy to read step by step / parts as needed.
- balance resources between reading files and using memory.
- choosing the right encoding for strings can also help (I would start with utf8 if it is mostly in ascii).
If the size of the distribution is also your problem, you can compress / unzip these files.
or you can just use this approach and use your own serialized class to represent subsets of the collection if it sounds like too much parsing and reading.
If you use objc types for storage and / or parsing, then it would be nice to keep these files small. if you use c or C ++, this will help profile the application.
your data set will require up to 30 MB using a single-byte encoding with 8 bits per character. one large file (again, ordered), which you will also consider. see [NSData initWithContentsOfMappedFile:path];
.
source share