code: func (encoder *IntLengthFieldBasedEncoder) Encode(data interface{}, out *ByteBuf) error {
  	buf := NewByteBuf(32)
  
  	if encoder.prepare != nil {
  		err := encoder.prepare(data, out)
  		if err != nil {
  			return err
  		}
  	}
  
  	err := encoder.base.Encode(data, buf)
  	if err != nil {
  		return err
  	}
  
  	out.WriteInt(buf.Readable())
  	out.WriteByteBuf(buf)
  	return nil
  }
docs: // Encode encode