| XML is common, and INI files are still used too. Honestly, it doesn't matter which one you use since they're both text. If the language has a specific facility for reading and parsing XML, it may be faster than using an INI file, though a language may also have built-in support for reading and parsing an INI file too. You could also use a binary file format, where the lengths of the "records" are varied in length. For example, you could have the equivalent of the following to store usernames (thinking about it like a hex editor):
'd' 'u' 'm' 'm' 'y' 00
'F' 's' 't' 00
You could also store the length, eliminating the need to check for a null terminator and also allowing you to have more control because you would not be reading an unknown number of bytes until you hit a null terminator, which may in fact be absent if improperly coded. The downside to this method is that you would need to ensure that it is saved properly, which would most likely require a hex editor if you don't have one already. |