Fix variable name:  gzip => self
Add test cases