Simple binary reading/writing API