RE: [GD-General] A portable preferences library
Brought to you by:
vexxed72
From: Brian H. <ho...@py...> - 2003-12-05 03:47:09
|
Okay, so back to the actual file format.... Originally I was thinking it would be a binary file format, strictly because I wanted the ability to serialize raw binary data "just in case". Now you could make a valid argument that you could always convert to text, i.e. 3.14 becomes "3.14", but maybe you don't want to suffer a data conversion loss or something, I dunno. Point being that I'd rather not dictate policy if I don't have to. So instead of doing a UUEncode, I could do an inefficient translation to ASCII by simply converting directly to ASCII. It would double in size if I used hex, but it would still be editable in a text editor. So if you need to write out 0x12 0x9A 0xBC 0x55 to the key "foo" then the file foo.pref would have: foo=3D129ABC55 Not efficient, but it works. Any obvious problems going this route? Brian |