{"id":13316255,"url":"https://github.com/Cowrod/test-encoder","last_synced_at":"2025-03-10T22:32:53.106Z","repository":{"id":228844646,"uuid":"775072076","full_name":"Cowrod/test-encoder","owner":"Cowrod","description":"a simple array encoder like JSON","archived":false,"fork":false,"pushed_at":"2024-11-15T19:34:38.000Z","size":25,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-15T20:28:22.963Z","etag":null,"topics":["encode","encode-decode","encoder","encoder-decoder","lua","luajit","luvit"],"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/Cowrod.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":"2024-03-20T17:54:29.000Z","updated_at":"2024-11-15T19:34:41.000Z","dependencies_parsed_at":"2024-03-20T19:27:49.486Z","dependency_job_id":"38ec159f-ac89-4615-8d6a-431ce367c547","html_url":"https://github.com/Cowrod/test-encoder","commit_stats":null,"previous_names":["cowrod/test-encoder"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cowrod%2Ftest-encoder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cowrod%2Ftest-encoder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cowrod%2Ftest-encoder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cowrod%2Ftest-encoder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Cowrod","download_url":"https://codeload.github.com/Cowrod/test-encoder/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242939415,"owners_count":20209874,"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":["encode","encode-decode","encoder","encoder-decoder","lua","luajit","luvit"],"created_at":"2024-07-29T18:20:37.970Z","updated_at":"2025-03-10T22:32:53.090Z","avatar_url":"https://github.com/Cowrod.png","language":"Lua","readme":"# test-encoder\nsimple array encoder/decoder\u003cbr/\u003e\nfaster than luvit's json, but a big bigger rathor to luvit's json.\n\n## Usage\n\n### Installation\n```bash\ngit clone https://github.com/Cowrod/test-encoder.git\ncd test-encoder\n```\n\n### Example usage\n\n```lua\n-- require the module and fs\nlocal encoder = require('./main')\nlocal fs = require('fs')\n\n-- example 1.\nfs.writeFileSync(\"myEncodedData.log\", encoder.encode{\n    index1 = \"index2\",\n    [9] = (function()\n        local output = {}\n        for i = 1, 500 do\n            table.insert(output, math.random(-1e13, 1e13))\n        end\n        return output\n    end)(),\n    what = \"yes\"\n})\n\nlocal decodedData = encoder.decode(fs.readFileSync(\"myEncodedData.log\"))[1]\n\n-- example 2.\nfor i = 1, 1e3 do\n    local data = {\n        id = i,\n        data1 = math.random(-1e13, 1e13),\n        data2 = randomstr(math.random(100))\n    }\n    fs.appendFileSync(\"myUpdatedData.log\", encoder.encode(data))\n    data = nil\nend\n\nlocal updatedData = encoder.decode(fs.readFileSync(\"myUpdatedData.log\"))\n```\n\n### Benchmark\n\n```bash\nluvit benchmark.lua\n# If you need to use this on other env's you will either need to remove the minifiying thing or replace it with another one that you have.\n```\n\n## License\n[GNU General Public License v3.0](LICENSE)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCowrod%2Ftest-encoder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FCowrod%2Ftest-encoder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCowrod%2Ftest-encoder/lists"}