{"id":16282878,"url":"https://github.com/dito97/alphacodings","last_synced_at":"2026-02-24T03:31:36.434Z","repository":{"id":254630293,"uuid":"847083133","full_name":"DiTo97/alphacodings","owner":"DiTo97","description":"base26 and base52 encodings","archived":false,"fork":false,"pushed_at":"2025-03-22T14:19:56.000Z","size":1844,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-25T23:55:13.288Z","etag":null,"topics":["encodings","natural-language-processing","tokenization","uv","vocabulary"],"latest_commit_sha":null,"homepage":"","language":"Python","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/DiTo97.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}},"created_at":"2024-08-24T19:52:25.000Z","updated_at":"2025-03-22T14:19:59.000Z","dependencies_parsed_at":"2024-09-06T17:12:19.127Z","dependency_job_id":"01b3c49f-a686-4a26-934e-535bdac223d6","html_url":"https://github.com/DiTo97/alphacodings","commit_stats":null,"previous_names":["dito97/alphacodings"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/DiTo97/alphacodings","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DiTo97%2Falphacodings","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DiTo97%2Falphacodings/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DiTo97%2Falphacodings/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DiTo97%2Falphacodings/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DiTo97","download_url":"https://codeload.github.com/DiTo97/alphacodings/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DiTo97%2Falphacodings/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29770766,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-24T03:15:54.600Z","status":"ssl_error","status_checked_at":"2026-02-24T03:15:54.143Z","response_time":75,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["encodings","natural-language-processing","tokenization","uv","vocabulary"],"created_at":"2024-10-10T19:11:55.010Z","updated_at":"2026-02-24T03:31:36.400Z","avatar_url":"https://github.com/DiTo97.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# Alphacodings\n\n\u003cimg src=\"resources/alphacodings.png\" width=\"256\" height=\"256\"\u003e\n\nbase26 ([A-Z]) and base52 ([A-Za-z]) encodings\n\u003c/div\u003e\n\n## 🌟 overview\n\ntransform any string to alphabetic-only with base26 ([A-Z]) and base52 ([A-Za-z]) lossless encodings; useful for transmitting textual data over restrictive channels or for training AI models and tokenizers on simpler vocabularies.\n\n**Alphacodings** is a fast and lightweight library using [GMP arithmetic](https://gmplib.org).\n\n## ⚙️ installation\n\n```python\npython -m pip install alphacodings\n```\n\n## 🚀 usage\n\n```python\nfrom alphacodings import base26_encode, base26_decode, base52_encode, base52_decode\n\n\nstring = \"\"\"\\\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n\u003chead\u003e\n    \u003ctitle\u003esample page\u003c/title\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n    \u003ch1\u003ewelcome!\u003c/h1\u003e\n    \u003cp\u003eyou are reading a sample HTML string.\u003c/p\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n\"\"\"\n\n\nif __name__ == \"__main__\":\n    encoding_base26 = base26_encode(string)\n    print(encoding_base26)\n    # \u003e\u003e\u003e [\"YBPNLKVNQWZQCMDHMLNDTVQCCRKQLNCFGMQPNGQCIXHUUPHFUNKUFEPDLKIGARFOKTDEZKQHXGCPYHDZKKVIUDNFOAYYAUOQFBJFFGSTKAXNWGDPVUJNBARPNXBASHZBXIBSSEFTAIQRPEADSOVVNXUMQXVDWTAIVCIVWQZAHAGYAVZYKGMETJOOUQNOEXMSOOGSKVMFBYZIBZDAITICYVXMJTTCCHPMSCABLYUMFDUNLVSLNKHSBPKCGASXJSFYDHZFAOEQTUACEBIFKQGYC\"]\n\n    encoding_base52 = base52_encode(string)\n    print(encoding_base52)\n    # \u003e\u003e\u003e [\"EgcgYRPxckylMQWRLDADNZxPJiJcHaVwYHLnicahBgaotGGANZuvsvcpSSOJFLXvKPjRlNQCJqqdviiIdtnwJyDOnWojsrpkWSTZFHbMIREvREjpsODtSxoLlLjQZOoehsGFzawGQecyuomgpZQNyFnZQLWPiDhzClwxBFCCwdqduGJoshrwFdwHWMtJpSTmjxzaYmNvzOIOwLkJvyQHCaFtrODPhbhBpPBmC\"]\n\n    assert base26_decode(encoding_base26) == string\n    assert base52_decode(encoding_base52) == string\n```\n\n## 🧠 motivation\n\nThe library is inspired by [@robert](https://github.com/robert)'s base26 implementation and his story of manipulating data transmission in restrictive network channels on long-distance flights using alphabetic-only encodings and tokenization.\n\n## 📊 benchmarking\n\nour implementation is orders of magnitude more efficient on 100k+ strings:\n\n\u003cdiv align=\"center\"\u003e\n\u003cimg src=\"resources/benchmark.png\" alt=\"benchmarking\"\u003e\n\n*Figure 1: runtime and memory usage performance against Heaton's original implementation with and without automatic chunking and SIMD on variable-length strings with a strict 60-second timeout; average over 5 trials.*\n\u003c/div\u003e\n\n## 🤝 contributing\n\ncontributions to **Alphacodings** are welcome!\n\nfeel free to submit pull requests or open issues on our repository.\n\n## 📄 license\n\nsee the [LICENSE](LICENSE) file for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdito97%2Falphacodings","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdito97%2Falphacodings","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdito97%2Falphacodings/lists"}