Low level binary IO helper