add compression to fixes#302
address comments from @wasade
Merge pull request #309 from teravest/addcompression

add compression to fixes#302