If the person who CTO'd that worked for me, they would not be CTO any more.
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.
(other than misogynistic and crude library names)
(shared memory -> require 'gangbang' or somesuch)