Throw a new Error, not string

See http://www.devthought.com/2011/12/22/a-string-is-not-an-error/
Use built-in zlib module instead of compress