{"id":13635000,"url":"https://github.com/mafintosh/uint64be","last_synced_at":"2025-04-30T07:49:39.810Z","repository":{"id":35922584,"uuid":"40210429","full_name":"mafintosh/uint64be","owner":"mafintosh","description":"Encode / decode big endian unsigned 64 bit integers","archived":false,"fork":false,"pushed_at":"2020-04-28T11:02:00.000Z","size":7,"stargazers_count":17,"open_issues_count":1,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-30T07:49:34.119Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/mafintosh.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":"2015-08-04T21:38:06.000Z","updated_at":"2020-05-26T16:29:53.000Z","dependencies_parsed_at":"2022-09-14T17:43:10.244Z","dependency_job_id":null,"html_url":"https://github.com/mafintosh/uint64be","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mafintosh%2Fuint64be","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mafintosh%2Fuint64be/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mafintosh%2Fuint64be/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mafintosh%2Fuint64be/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mafintosh","download_url":"https://codeload.github.com/mafintosh/uint64be/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251666226,"owners_count":21624290,"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":[],"created_at":"2024-08-02T00:00:38.914Z","updated_at":"2025-04-30T07:49:39.791Z","avatar_url":"https://github.com/mafintosh.png","language":"JavaScript","readme":"# uint64be\n\nEncode / decode big endian unsigned 64 bit integers\n\n```\nnpm install uint64be\n```\n\n[![build status](http://img.shields.io/travis/mafintosh/uint64be.svg?style=flat)](http://travis-ci.org/mafintosh/uint64be)\n\n## Usage\n\n``` js\nvar uint64be = require('uint64be')\n\nvar buf = uint64be.encode(42) // returns a 8 byte buffer with 42 encoded\nconsole.log(uint64be.decode(buf)) // returns 42\n```\n\n## Notice\n\nJavascript (currently) only supports integers up to `2^53 - 1` without any\nloss of precision so beware of this if you encode / decode any integers larger than that.\n\n## API\n\n#### `buffer = uint64be.encode(num, [buffer], [offset])`\n\nEncode a number as a big endian 64 bit unsigned integer.\nOptionally you can pass a buffer + offset as the 2nd and 3rd argument\nand the number will be encoded into that buffer at the given offset.\n\n#### `num = uint64be.decode(buffer, [offset])`\n\nDecode a number from a buffer.\n\n#### `length = uint64be.encodingLength(num)`\n\nAlways returns `8`. Added to comply with the standard encoding interface in node.\nSimilarly `uint64be.encode.bytes` and `uint64be.decode.bytes` is also set to `8`.\n\n## License\n\nMIT\n","funding_links":[],"categories":["data structures and algorithms"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmafintosh%2Fuint64be","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmafintosh%2Fuint64be","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmafintosh%2Fuint64be/lists"}