added ability to choose compression methods fixes #10