I once experimented with using SQLite as a file store for small images (10s of Kb). We had so many images on disk, that a recursive ls command wouldn't complete in a single day.<p>At one point we even hit inode limits.<p>I tested out storing the images in sqlite files across a few directories. I also testing using tar and zip storage with the same schema. Turns out the blog post they wrote was right, and SQLite was indeed faster than our normal IO.<p><a href="https://www.sqlite.org/fasterthanfs.html" rel="nofollow">https://www.sqlite.org/fasterthanfs.html</a>
Anytime you think you need to invent a file format for your application, please save yourself the trouble and use sqlite. It'll handle consistency, searching, updating, OS-specific quirks, everything.
For something used in so many places for so many reasons it's interesting to read everything they test for their releases...
<a href="https://www.sqlite.org/testing.html" rel="nofollow">https://www.sqlite.org/testing.html</a>