add check to make sure magic words and compression method are correct