MCPcopy Index your code
hub / github.com/tensorflow/tfjs / decode

Method decode

tfjs-core/src/platforms/platform_node.ts:76–81  ·  view source on GitHub ↗
(bytes: Uint8Array, encoding: string)

Source from the content-addressed store, hash-verified

74 return this.textEncoder.encode(text);
75 }
76 decode(bytes: Uint8Array, encoding: string): string {
77 if (bytes.length === 0) {
78 return '';
79 }
80 return new this.util.TextDecoder(encoding).decode(bytes);
81 }
82 isTypedArray(a: unknown): a is Float32Array | Int32Array | Uint8Array
83 | Uint8ClampedArray {
84 return this.util.types.isFloat32Array(a)

Callers

nothing calls this directly

Calls 1

decodeMethod · 0.65

Tested by

no test coverage detected