I have been spoiled by either using sql server to store data, or using xml files.
What are common techniques for storing data in flat files other than xml and CSV.
I know many times when I open files that data is all jumbled up, which means it is encoded right?
Are there any common techniques that I could read about somewhere?
Depends on your requirements. If it needs to be human readable then YAML, XML, and CVS are all good.
But if you need performance or storing binary values (say 8 byte double), then personally I create my own file format using Java’s excellent DataOutputStream and DataInputStream. But be careful when creating your own format. You generally don’t want to share it with the world, or else you will need to care about security and extendability. You’ll always have to care about data integrity and maybe add some crc checksums.
Its hard to get custom binary flat files correct, so make sure you truly need one and ask for help!