{"id":20872725,"url":"https://github.com/zalari/string-compression-utils","last_synced_at":"2025-07-01T23:05:40.062Z","repository":{"id":179450331,"uuid":"663428952","full_name":"zalari/string-compression-utils","owner":"zalari","description":"Compress or decompress a string with native browser APIs","archived":false,"fork":false,"pushed_at":"2023-08-01T21:52:32.000Z","size":118,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-06-05T12:40:46.358Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/zalari.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2023-07-07T09:14:26.000Z","updated_at":"2023-12-10T10:22:50.000Z","dependencies_parsed_at":"2024-11-18T09:34:08.466Z","dependency_job_id":null,"html_url":"https://github.com/zalari/string-compression-utils","commit_stats":null,"previous_names":["zalari/string-compression-utils"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/zalari/string-compression-utils","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zalari%2Fstring-compression-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zalari%2Fstring-compression-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zalari%2Fstring-compression-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zalari%2Fstring-compression-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zalari","download_url":"https://codeload.github.com/zalari/string-compression-utils/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zalari%2Fstring-compression-utils/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263047661,"owners_count":23405280,"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-11-18T06:20:27.870Z","updated_at":"2025-07-01T23:05:40.037Z","avatar_url":"https://github.com/zalari.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# String Compression\n\nCompress or decompress a string with [**native** browser APIs](https://developer.mozilla.org/en-US/docs/Web/API/Compression_Streams_API)\nwith [`gzip`, `deflate`, or `deflate-raw`](https://developer.mozilla.org/en-US/docs/Web/API/CompressionStream/CompressionStream#format).\\\nCompatible to use with [`atob`](https://developer.mozilla.org/en-US/docs/Web/API/atob) and\n[`btoa`](https://developer.mozilla.org/en-US/docs/Web/API/btoa).\n\n## Example Usage\n\n```js\nimport { compress, decompress } from '@zalari/string-compression-utils';\n\nconst input = '{\"id\":1,\"todo\":\"Do something nice for someone you care about\",\"completed\":true,\"userId\":26}';\n\nconst compressedString = await compress(input, 'gzip');\nconst urlFriendly = encodeURIComponent(compressedString);\n\nconst decodedString = decodeURIComponent(urlFriendly);\nconst output = await decompress(decodedString, 'gzip');\n\nconsole.assert(input === output);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzalari%2Fstring-compression-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzalari%2Fstring-compression-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzalari%2Fstring-compression-utils/lists"}