MCPcopy Create free account
hub / github.com/Shazbot/WH3-Mod-Manager / getDataSize

Function getDataSize

src/packFileSerializer.ts:204–212  ·  view source on GitHub ↗
(data: SchemaField[])

Source from the content-addressed store, hash-verified

202 }
203}
204function getDataSize(data: SchemaField[]): number {
205 let size = 0;
206 for (const field of data) {
207 for (const value of field.fields) {
208 size += getTypeSize(value.type, value.val);
209 }
210 }
211 return size;
212}
213export async function typeToBuffer(type: SCHEMA_FIELD_TYPE, value: PlainPackDataTypes): Promise<Buffer> {
214 switch (type) {
215 case "Boolean":

Callers 1

Calls 1

getTypeSizeFunction · 0.85

Tested by

no test coverage detected