code: public OtpErlangObject read_compressed() throws OtpErlangDecodeException {
          final int tag = read1skip_version();
  
          if (tag != OtpExternal.compressedTag) {
              throw new OtpErlangDecodeException(
                      "Wrong tag encountered, expected "
                              + OtpExternal.compressedTag + ", got " + tag);
          }
  
          final int size = read4BE();
          final byte[] abuf = new byte[size];
          final java.util.zip.InflaterInputStream is = new java.util.zip.InflaterInputStream(
                  this, new java.util.zip.Inflater(), size);
          int curPos = 0;
          try {
              int curRead;
              while (curPos < size
                      && (curRead = is.read(abuf, curPos, size - curPos)) != -1) {
                  curPos += curRead;
              }
              if (curPos != size) {
                  throw new OtpErlangDecodeException("Decompression gave "
                          + curPos + " bytes, not " + size);
              }
          } catch (final IOException e) {
              throw new OtpErlangDecodeException("Cannot read from input stream");
          }
  
          @SuppressWarnings("resource")
          final OtpInputStream ois = new OtpInputStream(abuf, flags);
          return ois.read_any();
      }
docs: Read a compressed term from the stream
  
  @return the resulting uncompressed term.
  
  @exception OtpErlangDecodeException
  if the next term in the stream is not a compressed term.