{"id":17044170,"url":"https://github.com/ngryman/zopfli-size","last_synced_at":"2025-03-23T02:26:47.771Z","repository":{"id":66059269,"uuid":"89146262","full_name":"ngryman/zopfli-size","owner":"ngryman","description":"Get the gzipped size of a string or buffer using Zopfli.","archived":false,"fork":false,"pushed_at":"2017-09-06T08:02:38.000Z","size":38,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-28T05:28:17.046Z","etag":null,"topics":["gzip","size","zopfli"],"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/ngryman.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":"2017-04-23T14:05:18.000Z","updated_at":"2017-04-23T14:18:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"830d8286-3c90-437f-8666-d2847616c481","html_url":"https://github.com/ngryman/zopfli-size","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/ngryman%2Fzopfli-size","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngryman%2Fzopfli-size/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngryman%2Fzopfli-size/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngryman%2Fzopfli-size/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ngryman","download_url":"https://codeload.github.com/ngryman/zopfli-size/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245046669,"owners_count":20552247,"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":["gzip","size","zopfli"],"created_at":"2024-10-14T09:33:07.990Z","updated_at":"2025-03-23T02:26:47.747Z","avatar_url":"https://github.com/ngryman.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# zopfli-size\n\n\u003e Get the gzipped size of a string or buffer using Zopfli.\n\n[![travis][travis-image]][travis-url] [![codecov][codecov-image]][codecov-url]\n\n[travis-image]: https://img.shields.io/travis/ngryman/zopfli-size.svg?style=flat\n[travis-url]: https://travis-ci.org/ngryman/zopfli-size\n[codecov-image]: https://img.shields.io/codecov/c/github/ngryman/zopfli-size.svg\n[codecov-url]: https://codecov.io/github/ngryman/zopfli-size\n\n\n## Usage\n\n```javascript\nvar zopfliSize = require('zopfli-size');\nvar string = 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.';\n\nconsole.log(string.length);\n//=\u003e 191\n\nconsole.log(zopfliSize.sync(string));\n//=\u003e 148\n```\n\n\n## API\n\n### `zopfliSize(input)`\n\nReturn a `Promise` that is resolved with the gzip size of `input. `input` can be a `string` or `Buffer`.\n\n### `zopfliSize.sync(input)`\n\nReturn the gzip of `input` size synchronously. `input` can be a `string` or `Buffer`.\n\n### `zopfliSize.strean()`\n\nReturn a passthrough stream. The stream emits a `gzip-size` event and has a `gzipSize` property.\n\n\n## Related\n\n - [zopfli-size-cli](https://github.com/ngryman/zopfli-size-cli) CLI for this module.\n\n\n## License\n\nMIT © [Nicolas Gryman](http://ngryman.sh)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fngryman%2Fzopfli-size","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fngryman%2Fzopfli-size","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fngryman%2Fzopfli-size/lists"}