docs: function encodeArray(array, proto, offset, buffer, protos){
      let i = 0;
  
      if(util.isSimpleType(proto.type)){
        offset = writeBytes(buffer, offset, encodeTag(proto.type, proto.tag));
        offset = writeBytes(buffer, offset, codec.encodeUInt32(array.length));
        for(i = 0; i < array.length; i++){
          offset = encodeProp(array[i], proto.type, offset, buffer);
        }
      }else{
        for(i = 0; i < array.length; i++){
          offset = writeBytes(buffer, offset, encodeTag(proto.type, proto.tag));
          offset = encodeProp(array[i], proto.type, offset, buffer, protos);
        }
      }
  
      return offset;
    }