code: public byte[] toCompressedJSON() throws IOException {
          // Wrap a GZIPOuputStream around a ByteArrayOuputStream.
          ByteArrayOutputStream bytesOut = new ByteArrayOutputStream();
          GZIPOutputStream gzipOut = new GZIPOutputStream(bytesOut);
          
          // Wrap the GZIPOutputStream with an OutputStreamWriter that convers JSON Unicode
          // text to bytes using UTF-8.
          OutputStreamWriter writer = new OutputStreamWriter(gzipOut, Utils.UTF8_CHARSET);
          
          // Create a JSONEmitter that will write its output to the writer above and generate
          // the JSON output.
          JSONEmitter json = new JSONEmitter(writer);
          json.startDocument();
          toJSON(json);
          json.endDocument();
          
          // Ensure the output stream is flushed and the GZIP is finished, then the output
          // buffer is complete.
          writer.flush();
          gzipOut.finish();
          return bytesOut.toByteArray();
      }
docs: Convert the DOM tree rooted at this UNode into a JSON document compressed with GZIP.
  
  @return JSON document for the DOM tree rooted at this UNode compressed with GZIP.
  @throws IOException  If an error occurs writing to the GZIP stream.