A simple interface to mmap for writing and reading binary data