MCPcopy Create free account
hub / github.com/apache/fory / readNamespace

Method readNamespace

javascript/packages/core/lib/context.ts:321–335  ·  view source on GitHub ↗
(reader: BinaryReader)

Source from the content-addressed store, hash-verified

319 }
320
321 readNamespace(reader: BinaryReader) {
322 const idOrLen = reader.readVarUInt32();
323 if (idOrLen & 1) {
324 return this.names[idOrLen >> 1];
325 }
326 const len = idOrLen >> 1;
327 if (len === 0) {
328 this.names.push("");
329 return "";
330 }
331 const encoding = reader.readUint8();
332 const name = this.namespaceDecoder.decode(reader, len, encoding);
333 this.names.push(name);
334 return name;
335 }
336
337 reset() {
338 this.names = [];

Callers

nothing calls this directly

Calls 3

decodeMethod · 0.65
readVarUInt32Method · 0.45
readUint8Method · 0.45

Tested by

no test coverage detected