
Ask HN: Resources for designing custom file formats - m0ther
I am working on a custom OO micro-database, which needs to persist to files.<p>I am spending a lot of time solving problems utilizing files that are novel to me; but I am certain have been solved many times over by others. I&#x27;m having a hard time finding resources describing patterns and practices for custom file types (especially where data is changing often, the items being stored can vary in size, and I want to rewrite the smallest portion of the file possible).<p>Are there resources out there that you know of? Old resources would be great. The language doesn&#x27;t matter. Any hints would help me save time.<p>The data is too volatile for something like JSON or XML to make sense, and the more I can optimize for performance the better. I will be storing more data than I want to keep in RAM at any one time, so just loading everything into RAM is not an option for this.<p>Thank you for any response :D
======
PaulHoule
The authors of SQLLite are better than anyone else at writing persistence code
that works despite the real-world imperfections of file systems. Either do
what they do or just use SQLLite!

