adds compression to file saving and db restore