src/vs/workbench/services/extensions/common/rpcProtocol.ts/MessageBuffer/sizeMixedArray
class MessageBuffer:	public static sizeMixedArray(arr: readonly MixedArg[]): number {
		let size = 0;
		size += 1; // arr length
		for (let i = 0, len = arr.length; i < len; i++) {
			const el = arr[i];
			size += 1; // arg type
			switch (el.type) {
				case ArgType.String:
					size += this.sizeLongString(el.value);
					break;
				case ArgType.VSBuffer:
					size += this.sizeVSBuffer(el.value);
					break;
				case ArgType.SerializedObjectWithBuffers:
					size += this.sizeUInt32; // buffer count
					size += this.sizeLongString(el.value);
					for (let i = 0; i < el.buffers.length; ++i) {
						size += this.sizeVSBuffer(el.buffers[i]);
					}
					break;
				case ArgType.Undefined:
					// empty...
					break;
			}
		}
		return size;
	}