use zlib instead of pako and instanceof Buffer instead of isBuffer