code: @Override
    public void writeTo(StreamOutput out) throws IOException {
      super.writeTo(out);
  
      // Encode flag
      out.writeBoolean(isPruned);
      // Encode size
      out.writeVInt(size);
      // Encode type of encoding
      out.writeVInt(termsEncoding.ordinal());
      // Encode terms
      out.writeBytesRef(encodedTerms);
      // Release terms
      encodedTerms = null;
    }
docs: Serialize
  
  @param out the output
  @throws IOException