TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Resources for designing custom file formats

3 pointsby m0therover 5 years ago
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

1 comment

PaulHouleover 5 years ago
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!