{"id":19885697,"url":"https://github.com/asmod4n/mruby-b64","last_synced_at":"2025-10-19T02:32:54.876Z","repository":{"id":76216371,"uuid":"58284297","full_name":"Asmod4n/mruby-b64","owner":"Asmod4n","description":"Base64 for mruby with a streaming interface","archived":false,"fork":false,"pushed_at":"2016-07-03T20:15:39.000Z","size":9,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-11T18:47:28.134Z","etag":null,"topics":["base64","mruby"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Asmod4n.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2016-05-07T21:01:31.000Z","updated_at":"2017-02-27T19:57:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"e6338515-0af5-4dbc-a12a-cf8111d0b612","html_url":"https://github.com/Asmod4n/mruby-b64","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Asmod4n%2Fmruby-b64","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Asmod4n%2Fmruby-b64/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Asmod4n%2Fmruby-b64/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Asmod4n%2Fmruby-b64/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Asmod4n","download_url":"https://codeload.github.com/Asmod4n/mruby-b64/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241313181,"owners_count":19942417,"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":["base64","mruby"],"created_at":"2024-11-12T17:35:19.714Z","updated_at":"2025-10-19T02:32:54.849Z","avatar_url":"https://github.com/Asmod4n.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mruby-b64\n\nExamples\n========\n\n```ruby\n#taken from https://en.wikipedia.org/wiki/Base64#Examples\nplain = \"Man is distinguished, not only by his reason, but by this singular passion from\nother animals, which is a lust of the mind, that by a perseverance of delight\nin the continued and indefatigable generation of knowledge, exceeds the short\nvehemence of any carnal pleasure.\"\n\nbase64 = B64.encode(plain)\n\nB64.decode(base64) == plain\n```\n\nStreaming Interface for encoding\n\n```ruby\nb64 = B64.new\n\nb64 \u003c\u003c \"welcome \" \u003c\u003c \"to \" \u003c\u003c \"base64 \" \u003c\u003c \"for \" \u003c\u003c \"mruby\"\n\nbase64 = b64.final\n\nB64.decode(base64) == \"welcome to base64 for mruby\"\n```\n\nAPI for Streaming Decoding and Encoding\n```ruby\nencoder = B64::Encoder.new\n\nstep1 = encoder.encode \"Man is distinguished, not only by his reason, but by this singular passion from\\n\"\nstep2 = encoder.encode \"other animals, which is a lust of the mind, that by a perseverance of delight\\n\"\nfinal = encoder.final\n\nB64.decode(step1 + step2 + final) == \"Man is distinguished, not only by his reason, but by this singular passion from\\nother animals, which is a lust of the mind, that by a perseverance of delight\\n\"\n```\n\n```ruby\ndecoder = B64::Decoder.new\n\nreverse_step1 = decoder.decode(step1)\nreverse_step2_final = decoder.decode(step2 + final)\ndecoder.reset\n\"Man is distinguished, not only by his reason, but by this singular passion from\\n\" + \"other animals, which is a lust of the mind, that by a perseverance of delight\\n\" == reverse_step1 + reverse_step2_final\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasmod4n%2Fmruby-b64","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasmod4n%2Fmruby-b64","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasmod4n%2Fmruby-b64/lists"}