{"id":15561007,"url":"https://github.com/jamescook/fb64","last_synced_at":"2025-03-29T04:18:25.994Z","repository":{"id":56846069,"uuid":"107612229","full_name":"jamescook/fb64","owner":"jamescook","description":"Fast Base64 C extension","archived":false,"fork":false,"pushed_at":"2017-10-20T01:01:59.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-04-25T19:20:28.271Z","etag":null,"topics":["base64","ruby"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/jamescook.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}},"created_at":"2017-10-20T00:18:31.000Z","updated_at":"2017-11-02T12:11:12.000Z","dependencies_parsed_at":"2022-09-09T18:01:41.666Z","dependency_job_id":null,"html_url":"https://github.com/jamescook/fb64","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/jamescook%2Ffb64","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamescook%2Ffb64/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamescook%2Ffb64/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamescook%2Ffb64/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jamescook","download_url":"https://codeload.github.com/jamescook/fb64/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246135775,"owners_count":20729058,"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","ruby"],"created_at":"2024-10-02T16:04:50.127Z","updated_at":"2025-03-29T04:18:25.971Z","avatar_url":"https://github.com/jamescook.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"### FB64 - Fast Base64\n\nFB64 is a C extension that can encode and decode base64. It leverages the [Base64](https://github.com/aklomp/base64) library.\n\n#### Installation\n1) Download and compile [Base64](https://github.com/aklomp/base64)\n2) Copy the library and headers to the appropriate directories,\n   such as /usr/local/lib and /usr/local/include on OSX.\n3) `gem install fb64`\n\n#### Sample Usage\n```ruby\nrequire \"fb64\"\nencoded = FB64.encode64(\"Sample String\")\nputs encoded\n=\u003e \"U2FtcGxlIFN0cmluZw==\"\n\nFB64.decode64(encoded)\n=\u003e \"Sample String\"\n```\n\n#### Benchmarks\nRun from 2.2Ghz Intel Core i7:\n\n```\nCalculating -------------------------------------\nFB64 encode large string\n                        279.814  (± 7.5%) i/s -      8.372k in  30.097192s\nBase64 encode large string\n                        146.939  (± 3.4%) i/s -      4.410k in  30.043984s\n\nComparison:\nFB64 encode large string:      279.8 i/s\nBase64 encode large string:      146.9 i/s - 1.90x  slower\n\nCalculating -------------------------------------\nFB64 decode large string\n                        213.429  (± 4.7%) i/s -      6.400k in  30.052835s\nBase64 decode large string\n                        110.270  (± 2.7%) i/s -      3.311k in  30.051945s\n\nComparison:\nFB64 decode large string:      213.4 i/s\nBase64 decode large string:      110.3 i/s - 1.94x  slower\n\nCalculating -------------------------------------\nFB64 encode small string\n                          2.195M (± 3.3%) i/s -     65.770M in  29.999757s\nBase64 encode small string\n                          1.249M (± 6.1%) i/s -     37.348M in  30.025452s\n\nComparison:\nFB64 encode small string:  2194957.8 i/s\nBase64 encode small string:  1249343.9 i/s - 1.76x  slower\n\nCalculating -------------------------------------\nFB64 decode small string\n                          1.957M (± 8.3%) i/s -     58.318M in  30.049957s\nBase64 decode small string\n                          1.165M (± 4.8%) i/s -     34.910M in  30.036906s\n\nComparison:\nFB64 decode small string:  1956556.9 i/s\nBase64 decode small string:  1165117.6 i/s - 1.68x  slower\n```\nRun `rake benchmark` after compiling to benchmark your own setup.\n\n#### Local development\n1) `bundle exec rake test -- --with-libbase64-dir=/path/to/libbase64`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamescook%2Ffb64","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjamescook%2Ffb64","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamescook%2Ffb64/lists"}