in reply to Updating Binary Files With variable record lengths
Slightly off-topic: For variable-length binary files, you should consider having each record start with something fairly unique (like an SOH) followed by the length of the record.
This doesn't answer your question, but it will make it easier to determine that you're procesing a valid record. (One organisms record break is anothers data.)