compresseion nearly finished

only write_to_disk() for index doesn't work yet