I wanted to create a single file database for storing bytes which emulates the way our filesystem works on a hard drive such that I am able to edit specific bytes (changed or saved by the user) while writing to the database instead of reading the whole file into memory changing a few bytes and rewriting the database file back to the disk.
How can I just alter specific bytes in the file using the file handler instead of requiring me loading the whole database into memory, doing the changes (this does not change the size of the overall file) and then storing it back.
I have tried searching my query but I am unable to get the answer I am looking for. I have tried using different modes for opening a file handler and maybe trying that.