MCPcopy Index your code
hub / github.com/di-sukharev/opencommit / encode_single_token

Method encode_single_token

out/cli.cjs:25731–25737  ·  view source on GitHub ↗

* @param {Uint8Array} bytes * @returns {number}

(bytes)

Source from the content-addressed store, hash-verified

25729 * @returns {number}
25730 */
25731 encode_single_token(bytes) {
25732 if (wasm == null) throw new Error("tiktoken: WASM binary has not been propery initialized.");
25733 const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export_0);
25734 const len0 = WASM_VECTOR_LEN;
25735 const ret = wasm.tiktoken_encode_single_token(this.__wbg_ptr, ptr0, len0);
25736 return ret >>> 0;
25737 }
25738 /**
25739 * @param {Uint32Array} tokens
25740 * @returns {Uint8Array}

Callers

nothing calls this directly

Calls 1

passArray8ToWasm0Function · 0.85

Tested by

no test coverage detected