{"id":16049016,"url":"https://github.com/lovell/64","last_synced_at":"2025-05-11T03:59:11.488Z","repository":{"id":63252629,"uuid":"85513713","full_name":"lovell/64","owner":"lovell","description":"High performance Base64 encoding and decoding for Node.js using SIMD (AVX2, AVX, SSE4.2, SSE4.1, SSSE3) acceleration","archived":false,"fork":false,"pushed_at":"2021-10-08T07:54:16.000Z","size":133,"stargazers_count":108,"open_issues_count":3,"forks_count":16,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-11T03:58:54.252Z","etag":null,"topics":["base64","decode","encode","nodejs","simd"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lovell.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-03-19T22:31:49.000Z","updated_at":"2025-02-11T15:49:14.000Z","dependencies_parsed_at":"2022-11-15T20:31:44.523Z","dependency_job_id":null,"html_url":"https://github.com/lovell/64","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovell%2F64","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovell%2F64/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovell%2F64/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovell%2F64/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lovell","download_url":"https://codeload.github.com/lovell/64/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253514629,"owners_count":21920337,"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","decode","encode","nodejs","simd"],"created_at":"2024-10-09T00:12:23.317Z","updated_at":"2025-05-11T03:59:11.466Z","avatar_url":"https://github.com/lovell.png","language":"JavaScript","readme":"# 64\n\nHigh performance Base64 encoding and decoding for Node.js\nusing SIMD (AVX2, AVX, SSE4.2, SSE4.1, SSSE3) acceleration.\nUses Alfred Klomp's [base64](https://github.com/aklomp/base64) library.\n\nWhen compared with Base64 encoding/decoding via Node's Buffer object,\nexpected performance gains are up to ~6x depending on length.\n\nDue to the cost of making a shared library call,\nit is less suitable for very short Buffers,\ntypically those less than ~300 bytes when encoding\nand less than ~150 bytes when decoding.\n\nPre-compiled binaries are provided for Node 6, 8 and 10 on the most common platforms.\n\n## Requirements\n\n* Node.js v6+\n* Linux, OS X or Windows\n* x86 or x64 CPU\n\n## Install\n\n```sh\nnpm install 64\n```\n\n## Usage\n\n```javascript\nimport { encode, decode } from '64';\n\nconst input = Buffer.from('The quick brown fox jumped over the lazy sleeping dog');\n\nconst encoded = encode(input); // VGhlIHF1aWNrIGJyb3duIGZveCBqdW1wZWQgb3ZlciB0aGUgbGF6eSBzbGVlcGluZyBkb2c=\nconst decoded = decode(encoded);\n```\n\n## API\n\n### encode(input)\n\n* `input` is a Buffer containing the data to be Base64 encoded.\n\nReturns a Buffer containing the Base64 encoded version of `input`.\n\nA TypeError will be thrown if `input` is not a Buffer.\n\n### decode(encoded)\n\n* `encoded` is a Buffer containing Base64 encoded data.\n\nReturns a Buffer containing the Base64 decoded version of `encoded`.\n\nA TypeError will be thrown if `encoded` is not a Buffer.\n\n## Performance\n\n* [Intel i3-4170](http://ark.intel.com/products/77490/Intel-Core-i3-4170-Processor-3M-Cache-3_70-GHz)\n* Ubuntu 16.04.3 LTS\n* Node.js v8.1.3\n\n![](https://raw.githubusercontent.com/lovell/64/master/test/bench.png)\n\n## Licence\n\nCopyright 2017, 2018 Lovell Fuller.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n     http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nCopyright (c) 2005-2007, Nick Galbreath\nCopyright (c) 2013-2017, Alfred Klomp\nCopyright (c) 2015-2017, Wojciech Mula\nCopyright (c) 2016-2017, Matthieu Darbois\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n- Redistributions of source code must retain the above copyright notice,\n  this list of conditions and the following disclaimer.\n\n- Redistributions in binary form must reproduce the above copyright\n  notice, this list of conditions and the following disclaimer in the\n  documentation and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS\nIS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED\nTO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A\nPARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nHOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED\nTO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\nPROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\nLIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\nNEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flovell%2F64","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flovell%2F64","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flovell%2F64/lists"}