更新时间:2023-01-28 20:32:58
文本文件的集合可以很好地工作。你可以:
a collection of text files could work well. you can:
如果分配大小也是您关注的问题,您可以压缩/解压缩这些文件。
if distribution size is also your concern, you could compress/decompress these files.
或者您可以采用这种方法并使用自定义序列化类,表示集合的子集,如果听起来像是太多的解析和读取实现。
or you can just take this approach and use a custom serialized class to represent a subsets of the collection if that sounds like too much parse and read implementation.
如果你使用objc类型进行存储和/或解析,那么保持这些文件小是好的。如果你使用c或c ++,那么它将有助于分析应用程序。
if you're using objc types for storage and/or parsing, then it would be good to keep those files small. if you use c or c++, then it would help to profile the app.
你的数据集需要使用每字符8位单字节编码最多30 MB。一个大文件(再次,有序),你mmap也值得考虑。参见 [NSData initWithContentsOfMappedFile:path];
。
your data set will require up to 30 MB using an 8 bit per character single byte encoding. one large file (again, ordered) which you mmap would also be worth consideration. see [NSData initWithContentsOfMappedFile:path];
.