Skip to content

add: fromBase64 — Base64 decode counterpart of toBase64#177

Merged
tettou771 merged 1 commit into
mainfrom
feat/frombase64
Jul 18, 2026
Merged

add: fromBase64 — Base64 decode counterpart of toBase64#177
tettou771 merged 1 commit into
mainfrom
feat/frombase64

Conversation

@tettou771

Copy link
Copy Markdown
Collaborator

Core has had toBase64 (a documented API) without its inverse — consumers such as supervisors decoding tc_get_screenshot's base64 payload had to vendor their own decoder.

  • fromBase64(const string&) -> vector<unsigned char> in tcUtils.h, right below toBase64
  • Padding (=), whitespace, and other non-alphabet bytes are skipped, so line-wrapped / MIME-style input decodes fine
  • For images, combine with Image::loadFromMemory

Docs/bindings pipeline fully regenerated:

  • api-reference.toml en/ja/ko entry (+toBase64 related link) — check.js --strict green (0 orphan / 0 undocumented)
  • luagen: fromBase64 bound; shard diffs are the fixed 16-way split redistributing types
  • bindcheck: 426 functions present / 0 missing / 0 call failures

Web data (trussc.org generated JS) regenerated separately; will be committed to trussc.org after merge.

Core has had toBase64 (a documented API) without its inverse; consumers (e.g.
supervisors decoding tc_get_screenshot's base64 payload) had to vendor a
decoder. fromBase64(string) -> vector<unsigned char>; padding, whitespace and
other non-alphabet bytes are skipped, so line-wrapped/MIME input decodes fine.
For images, combine with Image::loadFromMemory.

Pipeline: api-reference.toml (en/ja/ko, check.js --strict green), luagen regen
(fromBase64 bound; shard redistribution from the fixed 16-way split), bindcheck
426 functions present / 0 missing / 0 call failures.
@tettou771
tettou771 merged commit 0b6e7c7 into main Jul 18, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant