make mmap read-only and simplify
add simple index format reader