{"id":21509353,"url":"https://github.com/semyon422/luajit-byte","last_synced_at":"2026-01-06T18:11:51.699Z","repository":{"id":109731492,"uuid":"237612349","full_name":"semyon422/luajit-byte","owner":"semyon422","description":"Binary data module (moved https://github.com/semyon422/aqua)","archived":false,"fork":false,"pushed_at":"2022-04-26T11:08:15.000Z","size":48,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-02T06:14:51.250Z","etag":null,"topics":["binary","buffer","ffi","lua","luajit"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/semyon422.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":"2020-02-01T12:34:45.000Z","updated_at":"2022-10-04T12:38:23.000Z","dependencies_parsed_at":"2023-06-11T06:45:16.690Z","dependency_job_id":null,"html_url":"https://github.com/semyon422/luajit-byte","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/semyon422%2Fluajit-byte","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semyon422%2Fluajit-byte/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semyon422%2Fluajit-byte/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semyon422%2Fluajit-byte/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/semyon422","download_url":"https://codeload.github.com/semyon422/luajit-byte/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245974061,"owners_count":20702956,"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":["binary","buffer","ffi","lua","luajit"],"created_at":"2024-11-23T21:24:29.250Z","updated_at":"2026-01-06T18:11:51.671Z","avatar_url":"https://github.com/semyon422.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# luajit-byte\nBinary data module\n```lua\nlocal byte = require(\"byte\")\n\n-- Byte buffer example, check source code for more info\nlocal b = byte.buffer(2e9) -- allocate 2GB\nb:resize(4e9) -- reallocate to 4GB\nffi.fill(b.pointer, b.size, 0) -- fill with zeros\n\nprint(b:fill(\"Hello, \"):fill(\"World!\"):seek(0):string(13)) -- Hello, World!\n\nb:free() -- optional, the garbage collector can handle this correctly\n\n-- nan boxing example\nlocal b = byte.buffer(8)\nb:double_be(0 / 0):seek(4):fill(\"love\")\n\nlocal nanbox = b:seek(0):double_be()\nassert(nanbox ~= nanbox) -- nan\n\nassert(b:seek(0):double_be(nanbox):seek(4):string(4) == \"love\")\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsemyon422%2Fluajit-byte","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsemyon422%2Fluajit-byte","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsemyon422%2Fluajit-byte/lists"}