added optional arg to specify compression algorithm