File format hacking

Today, I was researching the file format of a legacy application that is not supported anymore. I don’t think the company that made the program exist anymore, probably suffering the same fate as anyother (legacy) database vendor: swallowed up by larger corporations.

I noticed something weird though, while counting bits, bytes and comparing high and lows: why would someone write or design a database file format where the number of records is stored in the file itself? This is particularly weird knowing the following: all the records have a fixed size, which makes it more or less like a regular random access file (minus the header data and field definitions). After all the number of records would be:

(length_of_the_file - (header_def - field_def))/ record_length) = number_records.

Related: In case you need a good Windows Hex editor. The graphing part reminds me of an old hexeditor I once wrote (it should be still around on my old laptop).

This entry was posted in Programming. Bookmark the permalink.