public static byte[] zip(Object obj) throws IOException {
    // logger.info("CacheServerHelper: Zipping object to blob: " + obj);
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    GZIPOutputStream gz = new GZIPOutputStream(baos);
    ObjectOutputStream oos = new ObjectOutputStream(gz);
    oos.writeObject(obj);
    oos.flush();
    oos.close();
    byte[] blob = baos.toByteArray();
    // logger.info("CacheServerHelper: Zipped object to blob: " + blob);
    return blob;
  }
<code>CacheServerHelper</code> is a static class that provides helper methods for the CacheServer
classes.

@since GemFire 3.5
geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/CacheServerHelper.java