Add compression option to grammar extractor