{"id":21524144,"url":"https://github.com/epicericee/typst-based","last_synced_at":"2026-03-19T20:43:50.571Z","repository":{"id":253468127,"uuid":"824538830","full_name":"EpicEricEE/typst-based","owner":"EpicEricEE","description":"A Typst package for encoding and decoding in base64, base32, and base16.","archived":false,"fork":false,"pushed_at":"2024-11-06T00:01:42.000Z","size":48,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-24T05:11:26.310Z","etag":null,"topics":["base16","base32","base64","typst","typst-package","typst-plugin"],"latest_commit_sha":null,"homepage":"","language":"Typst","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/EpicEricEE.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-07-05T10:49:20.000Z","updated_at":"2024-11-06T00:00:47.000Z","dependencies_parsed_at":"2024-08-16T23:22:00.612Z","dependency_job_id":"7a887ebb-99a3-4c70-805c-e44c33e0ffa6","html_url":"https://github.com/EpicEricEE/typst-based","commit_stats":null,"previous_names":["epicericee/typst-based"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EpicEricEE%2Ftypst-based","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EpicEricEE%2Ftypst-based/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EpicEricEE%2Ftypst-based/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EpicEricEE%2Ftypst-based/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EpicEricEE","download_url":"https://codeload.github.com/EpicEricEE/typst-based/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244082532,"owners_count":20395289,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["base16","base32","base64","typst","typst-package","typst-plugin"],"created_at":"2024-11-24T01:21:08.161Z","updated_at":"2026-01-04T11:07:38.556Z","avatar_url":"https://github.com/EpicEricEE.png","language":"Typst","funding_links":[],"categories":[],"sub_categories":[],"readme":"# based\n\nA package for encoding and decoding in base64, base32, and base16.\n\n## Usage\n\nThe package comes with three submodules: `base64`, `base32`, and `base16`. All of them have an `encode` and `decode` function. The package also provides the function aliases\n\n- `encode64` / `decode64`,\n- `encode32` / `decode32`, and\n- `encode16` / `decode16`.\n\nBoth base64 and base32 allow you to choose whether to use padding for encoding via the `pad` parameter, which is enabled by default. Base64 also allows you to encode with the URL-safe alphabet by enabling the `url` parameter, while base32 allows you to encode or decode with the \"extended hex\" alphabet via the `hex` parameter. Both options are disabled by default. The base16 encoder uses lowercase letters, the decoder is case-insensitive.\n\nYou can encode strings, arrays and bytes. The `encode` function will return a string, while the `decode` function will return bytes.\n\n## Example\n\n```typ\n#import \"@preview/based:0.2.0\": base64, base32, base16\n\n#table(\n  columns: 3,\n  \n  table.header[*Base64*][*Base32*][*Base16*],\n\n  raw(base64.encode(\"Hello world!\")),\n  raw(base32.encode(\"Hello world!\")),\n  raw(base16.encode(\"Hello world!\")),\n\n  str(base64.decode(\"SGVsbG8gd29ybGQh\")),\n  str(base32.decode(\"JBSWY3DPEB3W64TMMQQQ====\")),\n  str(base16.decode(\"48656C6C6F20776F726C6421\"))\n)\n```\n\n![Result of example code.](./assets/example.svg)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fepicericee%2Ftypst-based","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fepicericee%2Ftypst-based","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fepicericee%2Ftypst-based/lists"}