{"id":46646436,"url":"https://github.com/tobiaslocker/base64","last_synced_at":"2026-03-08T04:34:49.977Z","repository":{"id":52186516,"uuid":"188912126","full_name":"tobiaslocker/base64","owner":"tobiaslocker","description":"A modern C++ base64 encoder / decoder ","archived":false,"fork":false,"pushed_at":"2025-11-23T00:13:02.000Z","size":63,"stargazers_count":197,"open_issues_count":5,"forks_count":27,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-11-23T01:14:38.553Z","etag":null,"topics":["base64","base64-encoding","base64decode"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tobiaslocker.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-05-27T21:39:20.000Z","updated_at":"2025-11-23T00:13:05.000Z","dependencies_parsed_at":"2022-08-24T02:10:45.239Z","dependency_job_id":"b9d65f5f-8114-46ec-930d-559f07da633f","html_url":"https://github.com/tobiaslocker/base64","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tobiaslocker/base64","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobiaslocker%2Fbase64","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobiaslocker%2Fbase64/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobiaslocker%2Fbase64/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobiaslocker%2Fbase64/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tobiaslocker","download_url":"https://codeload.github.com/tobiaslocker/base64/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobiaslocker%2Fbase64/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30245279,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-08T00:58:18.660Z","status":"online","status_checked_at":"2026-03-08T02:00:06.215Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["base64","base64-encoding","base64decode"],"created_at":"2026-03-08T04:34:49.413Z","updated_at":"2026-03-08T04:34:49.960Z","avatar_url":"https://github.com/tobiaslocker.png","language":"C++","readme":"# base64\n\nA simple, header-only C++17 library for Base64 encoding and decoding. Uses modern C++ features when available\n(e.g., `std::bit_cast` in C++20) while remaining portable and efficient.\n\n## Features\n\n- Header-only, single-file library  \n- Fast encoding/decoding using lookup tables  \n- Safe type punning using `std::bit_cast` (avoids undefined behavior with unions)  \n- Throws `std::runtime_error` for invalid Base64 input (size, padding, or characters)  \n\n## Platform Support\n\n- Compilers: GCC, Clang, MSVC  \n- Architectures: x86, x64, ARM, AArch64 (little-endian)  \n- Requires C++17 (C++20 features optional)  \n\n## Usage\n\n```cpp\n#include \u003ciostream\u003e  \n#include \"base64.hpp\"  \n\nint main() {  \n    auto encoded = base64::to_base64(\"Hello, World!\");  \n    std::cout \u003c\u003c encoded \u003c\u003c std::endl; // SGVsbG8sIFdvcmxkIQ==  \n\n    auto decoded = base64::from_base64(\"SGVsbG8sIFdvcmxkIQ==\");  \n    std::cout \u003c\u003c decoded \u003c\u003c std::endl; // Hello, World!  \n}\n```\n\n## Notes\n\n- Inspired by Nick Galbreath's modp_b64 (used by Chromium) for high performance  \n- Compatible with C++17; optionally uses C++20 features  \n- Avoids union-based type punning for safety  \n- Faster implementations exist using SIMD or multithreading but are not header-only  \n\n## References\n\n- Benchmark of C/C++ Base64 libraries: https://github.com/gaspardpetit/base64/  \n- Chromium modp_b64: https://github.com/chromium/chromium/tree/main/third_party/modp_b64  \n- SIMD/optimized alternatives:  \n  - https://github.com/aklomp/base64  \n  - https://github.com/simdutf/simdutf  \n  - https://github.com/powturbo/Turbo-Base64\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftobiaslocker%2Fbase64","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftobiaslocker%2Fbase64","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftobiaslocker%2Fbase64/lists"}