{"id":15722513,"url":"https://github.com/indiesoftby/defold-zstd","last_synced_at":"2025-07-10T01:09:47.971Z","repository":{"id":257675128,"uuid":"859000290","full_name":"indiesoftby/defold-zstd","owner":"indiesoftby","description":"Zstandard compression API for the Defold engine.","archived":false,"fork":false,"pushed_at":"2025-05-04T14:08:33.000Z","size":605,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-05-13T04:17:41.319Z","etag":null,"topics":["defold","defold-extension","defold-library","defold-native-extension","zstd"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/indiesoftby.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,"zenodo":null}},"created_at":"2024-09-17T22:45:54.000Z","updated_at":"2025-05-06T21:21:22.000Z","dependencies_parsed_at":"2024-09-18T03:19:55.430Z","dependency_job_id":"445995a3-b0ab-4736-add9-c276a73ac7b3","html_url":"https://github.com/indiesoftby/defold-zstd","commit_stats":null,"previous_names":["indiesoftby/defold-zstd"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/indiesoftby/defold-zstd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indiesoftby%2Fdefold-zstd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indiesoftby%2Fdefold-zstd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indiesoftby%2Fdefold-zstd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indiesoftby%2Fdefold-zstd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/indiesoftby","download_url":"https://codeload.github.com/indiesoftby/defold-zstd/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indiesoftby%2Fdefold-zstd/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264507300,"owners_count":23619189,"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":["defold","defold-extension","defold-library","defold-native-extension","zstd"],"created_at":"2024-10-03T22:08:14.695Z","updated_at":"2025-07-10T01:09:47.954Z","avatar_url":"https://github.com/indiesoftby.png","language":"C","funding_links":[],"categories":["Libraries"],"sub_categories":["Programming Language"],"readme":"[![Zstd Cover](cover.jpg)](https://github.com/indiesoftby/defold-zstd)\n\n# Zstandard Compression for Defold\n\nThis is a native extension for [the Defold game engine](https://defold.com/) that allows you to use Zstandard to compress and decompress strings in your Lua code. The included version of Zstd is 1.5.7.\n\n\u003e [Zstandard](https://github.com/facebook/zstd), or `zstd` as short version, is a fast lossless compression algorithm, targeting real-time compression scenarios at zlib-level and better compression ratios.\n\nCurrently, the extension has simple API with two functions: `compress` and `decompress`. It doesn't support streaming, dictionaries and other features of the Zstd library. If you need more features, you can fill an issue on GitHub or even better - submit a PR.\n\n## Usage\n\nFirst add this extension as a dependency to your `game.project`:\n\n    https://github.com/indiesoftby/defold-zstd/archive/main.zip\n\nIt makes available global Lua functions `zstd.*`. Then you can use the extension in your Lua code:\n\n```lua\nlocal compression_level = 3 -- default is 3, maximum and the slowest compression level is 22\nlocal compressed = zstd.compress(\"Hello, world!\", compression_level)\nlocal decompressed = zstd.decompress(compressed)\n\nprint(decompressed)\n```\n\n## API\n\n### `zstd.version()`\nReturns the version of the Zstandard library.\n\n**Returns:**\n- `string`: The version.\n\n### `zstd.compress(data, level)`\nCompresses a string.\n\n**Parameters:**\n- `data` (string): The data to compress.\n- `level` (number, optional): Optional compression level (default is 3, maximum is 22)\n\n**Returns:**\n- `string`: The compressed data\n\n### `zstd.decompress(data)`\nDecompresses a string.\n\n**Parameters:**\n- `data` (string): The data to decompress.\n\n**Returns:**\n- `string`: The decompressed data.\n\n## License\n\nThis project is licensed under the BSD 3-Clause License. See the LICENSE and LICENSE.zstd files for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Findiesoftby%2Fdefold-zstd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Findiesoftby%2Fdefold-zstd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Findiesoftby%2Fdefold-zstd/lists"}