Rewrite the API with a more modern code style and use of BinaryReader/BinaryWriter methods.