You don't even need a database. Just a file that you memmap. You can even use fixed length strings in the file to make it really fast.
Basically just take your hash structure and write it to disk.
Basically just take your hash structure and write it to disk.
The only problem with it is the 32bit offsets mean a 4GB max. Not too hard to fork it for 64bit offsets, though.