code: public static byte[] gzipCompress(String str, String encoding) {
  		if (str == null || str.length() == 0) {
  			return null;
  		}
  		ByteArrayOutputStream out = new ByteArrayOutputStream();
  		GZIPOutputStream gzip;
  		try {
  			gzip = new GZIPOutputStream(out);
  			gzip.write(str.getBytes(encoding));
  			gzip.close();
  		} catch (IOException e) {
  		}
  		return out.toByteArray();
  	}
docs: 字符串压缩为GZIP字节数组
  
  @param str
  @param encoding
  @return