MCPcopy Create free account
hub / github.com/denoland/std / encode

Function encode

encoding/_common16.ts:32–44  ·  view source on GitHub ↗
(
  buffer: Uint8Array_,
  i: number,
  o: number,
  alphabet: Uint8Array,
)

Source from the content-addressed store, hash-verified

30}
31
32export function encode(
33 buffer: Uint8Array_,
34 i: number,
35 o: number,
36 alphabet: Uint8Array,
37): number {
38 for (; i < buffer.length; ++i) {
39 const x = buffer[i]!;
40 buffer[o++] = alphabet[x >> 4]!;
41 buffer[o++] = alphabet[x & 0xF]!;
42 }
43 return o;
44}
45
46export function decode(
47 buffer: Uint8Array_,

Callers 15

transformMethod · 0.90
flushMethod · 0.90
transformMethod · 0.90
transformMethod · 0.90
flushMethod · 0.90
transformMethod · 0.90
encodeHexFunction · 0.90
encodeIntoHexFunction · 0.90
encodeBase64Function · 0.90
encodeHexFunction · 0.90
encodeBase32Function · 0.90
encodeBase64UrlFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected