{"id":17799234,"url":"https://github.com/brooooooklyn/snappy","last_synced_at":"2025-05-15T03:08:59.957Z","repository":{"id":39189119,"uuid":"375384084","full_name":"Brooooooklyn/snappy","owner":"Brooooooklyn","description":"Fastest Snappy compression library in Node.js","archived":false,"fork":false,"pushed_at":"2025-05-10T18:26:09.000Z","size":15180,"stargazers_count":179,"open_issues_count":13,"forks_count":10,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-12T21:41:13.605Z","etag":null,"topics":["compression","napi","napi-rs","node-api","rust","snappy"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/Brooooooklyn.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["Brooooooklyn"]}},"created_at":"2021-06-09T14:28:04.000Z","updated_at":"2025-05-08T06:09:09.000Z","dependencies_parsed_at":"2023-02-09T19:01:23.316Z","dependency_job_id":"4c78236d-235f-41c3-8527-1cf380c7efde","html_url":"https://github.com/Brooooooklyn/snappy","commit_stats":{"total_commits":194,"total_committers":5,"mean_commits":38.8,"dds":0.4690721649484536,"last_synced_commit":"539148c2a3684c5461ee496a9deae5f9a8d4be47"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":"napi-rs/package-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Brooooooklyn%2Fsnappy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Brooooooklyn%2Fsnappy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Brooooooklyn%2Fsnappy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Brooooooklyn%2Fsnappy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Brooooooklyn","download_url":"https://codeload.github.com/Brooooooklyn/snappy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254264770,"owners_count":22041794,"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":["compression","napi","napi-rs","node-api","rust","snappy"],"created_at":"2024-10-27T12:06:16.396Z","updated_at":"2025-05-15T03:08:54.943Z","avatar_url":"https://github.com/Brooooooklyn.png","language":"Rust","readme":"# `snappy`\n\n![https://github.com/Brooooooklyn/snappy/actions](https://github.com/Brooooooklyn/snappy/workflows/CI/badge.svg)\n![](https://img.shields.io/npm/dm/snappy.svg?sanitize=true)\n[![Install size](https://packagephobia.com/badge?p=snappy)](https://packagephobia.com/result?p=snappy)\n\n**!!! For `snappy@6.x` and below, please go to [`node-snappy`](https://github.com/kesla/node-snappy).**\n\nMore background about the **6-7** changes, please read [this](https://github.com/Brooooooklyn/snappy/issues/16), Thanks [@kesla](https://github.com/kesla) .\n\n\u003e 🚀 Help me to become a full-time open-source developer by [sponsoring me on Github](https://github.com/sponsors/Brooooooklyn)\n\nFastest Snappy compression library in Node.js, powered by [napi-rs](https://napi.rs) and [rust-snappy](https://github.com/BurntSushi/rust-snappy).\n\n\u003e For small size data, [snappyjs](https://github.com/zhipeng-jia/snappyjs) is faster, and it support browser. But it doesn't have async API, which is important for Node.js program.\n\n## Install this package\n\n```\nyarn add snappy\n```\n\n## Support matrix\n\n|                  | node12 | node14 | node16 | node18 |\n| ---------------- | ------ | ------ | ------ | ------ |\n| Windows x64      | ✓      | ✓      | ✓      | ✓      |\n| Windows x32      | ✓      | ✓      | ✓      | ✓      |\n| Windows arm64    | ✓      | ✓      | ✓      | ✓      |\n| macOS x64        | ✓      | ✓      | ✓      | ✓      |\n| macOS arm64      | ✓      | ✓      | ✓      | ✓      |\n| Linux x64 gnu    | ✓      | ✓      | ✓      | ✓      |\n| Linux x64 musl   | ✓      | ✓      | ✓      | ✓      |\n| Linux arm gnu    | ✓      | ✓      | ✓      | ✓      |\n| Linux arm64 gnu  | ✓      | ✓      | ✓      | ✓      |\n| Linux arm64 musl | ✓      | ✓      | ✓      | ✓      |\n| Android arm64    | ✓      | ✓      | ✓      | ✓      |\n| Android armv7    | ✓      | ✓      | ✓      | ✓      |\n| FreeBSD x64      | ✓      | ✓      | ✓      | ✓      |\n\n## API\n\n```ts\nexport function compressSync(input: Buffer | string | ArrayBuffer | Uint8Array): Buffer\nexport function compress(input: Buffer | string | ArrayBuffer | Uint8Array): Promise\u003cBuffer\u003e\nexport function uncompressSync(compressed: Buffer): Buffer\nexport function uncompress(compressed: Buffer): Promise\u003cBuffer\u003e\n```\n\n## Performance\n\n### Hardware\n\n```\nOS: Windows 11 x86_64\nHost: Micro-Star International Co., Ltd. MS-7C35\nKernel: 10.0.22000\nTerminal: Windows Terminal\nCPU: AMD Ryzen 9 5950X (32) @ 3.400GHz\nMemory: 32688MiB\n```\n\n### Result\n\n```\nRunning \"Compress\" suite...\nProgress: 100%\n\n  snappy:\n    4 220 ops/s, ±0.66%   | fastest\n\n  snappy-v6:\n    2 018 ops/s, ±0.84%   | 52.18% slower\n\n  gzip:\n    233 ops/s, ±0.52%     | slowest, 94.48% slower\n\n  deflate:\n    235 ops/s, ±0.45%     | 94.43% slower\n\n  brotli:\n    7 ops/s, ±0.51%       | slowest, 99.85% slower\n\nFinished 4 cases!\n  Fastest: snappy\n  Slowest: brotli\n\nRunning \"Decompress\" suite...\nProgress: 100%\n\n  snappy:\n    8 528 ops/s, ±1.03%   | fastest\n\n  snappy-v6:\n    6 357 ops/s, ±1.76%   | 25.46% slower\n\n  gzip:\n    1 406 ops/s, ±1.80%   | slowest, 83.51% slower\n\n  deflate:\n    1 435 ops/s, ±1.88%   | 83.17% slower\n\n  brotli:\n    1 208 ops/s, ±1.50%   | slowest, 86.99% slower\n\nFinished 4 cases!\n  Fastest: snappy\n  Slowest: brotli\n```\n","funding_links":["https://github.com/sponsors/Brooooooklyn"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrooooooklyn%2Fsnappy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrooooooklyn%2Fsnappy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrooooooklyn%2Fsnappy/lists"}