Files
scriptc/packages
Chris Tate f716dec756 Convert Buffers to and from latin1 and hex text a word at a time
- toString("latin1"): counts the high bytes eight at a time, copies
  words of ASCII bytes, and writes other bytes from a table of their
  UTF-8 pairs without branches. ASCII-only results are marked ASCII, and
  other results record their UTF-16 length (one unit per byte), so
  `.length` does not walk the string.
- Buffer.from(text, "latin1" | "ascii" | "binary"): copies text known to
  be ASCII, copies words of ASCII bytes, and decodes eight bytes of one-
  and two-byte sequences in one word, storing each output byte without
  branches. Longer sequences take the previous path.
- Buffer.from(text, "hex"): reads digit values from a table.
- toString("hex") and toString("base64"/"base64url") mark their results
  ASCII, so a later decode, length or index read skips the scan for
  non-ASCII bytes.
2026-10-24 23:26:01 -05:00
..
2026-10-24 21:09:40 -05:00
2026-10-23 20:51:00 -05:00
2026-10-23 20:51:00 -05:00
2026-10-23 20:51:00 -05:00
2026-10-23 20:51:00 -05:00
2026-10-23 20:51:00 -05:00
2026-10-23 20:51:00 -05:00
2026-10-23 20:51:00 -05:00
2026-10-23 20:51:00 -05:00
2026-10-23 20:51:00 -05:00
2026-10-24 21:09:40 -05:00
2026-10-23 20:51:00 -05:00
2026-10-23 20:51:00 -05:00
2026-10-24 21:09:40 -05:00
2026-10-23 20:51:00 -05:00
2026-10-23 20:51:00 -05:00