{"id":32986349,"url":"https://google.github.io/snappy/","last_synced_at":"2025-11-16T19:01:51.671Z","repository":{"id":14663074,"uuid":"17381605","full_name":"google/snappy","owner":"google","description":"A fast compressor/decompressor","archived":false,"fork":false,"pushed_at":"2025-10-20T13:36:49.000Z","size":2887,"stargazers_count":6471,"open_issues_count":55,"forks_count":1014,"subscribers_count":179,"default_branch":"main","last_synced_at":"2025-11-07T01:51:42.867Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/google/snappy","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"WebApiContrib/WebAPIContrib","license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/google.png","metadata":{"files":{"readme":"README.md","changelog":"NEWS","contributing":"CONTRIBUTING.md","funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2014-03-03T21:58:09.000Z","updated_at":"2025-11-05T23:47:51.000Z","dependencies_parsed_at":"2023-02-18T05:01:08.343Z","dependency_job_id":"5b4af4e1-daef-49b5-b508-3dfe0f904217","html_url":"https://github.com/google/snappy","commit_stats":{"total_commits":343,"total_committers":46,"mean_commits":7.456521739130435,"dds":0.7288629737609329,"last_synced_commit":"2c94e11145f0b7b184b831577c93e5a41c4c0346"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/google/snappy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fsnappy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fsnappy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fsnappy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fsnappy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/google","download_url":"https://codeload.github.com/google/snappy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fsnappy/sbom","scorecard":{"id":437940,"data":{"date":"2025-08-11","repo":{"name":"github.com/google/snappy","commit":"6f99459b5b837fa18abb1be317d3ac868530f384"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":5.5,"checks":[{"name":"Maintained","score":3,"reason":"4 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 3","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":5,"reason":"Found 11/22 approved changesets -- score normalized to 5","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:98: update your workflow using https://app.stepsecurity.io/secureworkflow/google/snappy/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/riscv64-qemu-test.yaml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/google/snappy/riscv64-qemu-test.yaml/main?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: topLevel 'contents' permission set to 'read': .github/workflows/build.yml:33","Warn: no topLevel permission defined: .github/workflows/riscv64-qemu-test.yaml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Fuzzing","score":10,"reason":"project is fuzzed","details":["Info: OSSFuzz integration found","Info: CppLibFuzzer integration found: snappy_compress_fuzzer.cc:40","Info: CppLibFuzzer integration found: snappy_uncompress_fuzzer.cc:40","Info: CppLibFuzzer integration found: snappy_compress_fuzzer.cc:40","Info: CppLibFuzzer integration found: snappy_uncompress_fuzzer.cc:40"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: COPYING:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: github.com/google/.github/SECURITY.md:1","Info: Found linked content: github.com/google/.github/SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/google/.github/SECURITY.md:1","Info: Found text in security policy: github.com/google/.github/SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"SAST","score":1,"reason":"SAST tool is not run on all commits -- score normalized to 1","details":["Warn: 2 commits out of 17 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-19T05:05:57.508Z","repository_id":14663074,"created_at":"2025-08-19T05:05:57.508Z","updated_at":"2025-08-19T05:05:57.508Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":283796818,"owners_count":26896273,"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","status":"online","status_checked_at":"2025-11-11T02:00:06.610Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2025-11-13T08:00:38.174Z","updated_at":"2025-11-16T19:01:51.666Z","avatar_url":"https://github.com/google.png","language":"C++","readme":"Snappy, a fast compressor/decompressor.\n\n[![Build Status](https://github.com/google/snappy/actions/workflows/build.yml/badge.svg)](https://github.com/google/snappy/actions/workflows/build.yml)\n\nIntroduction\n============\n\nSnappy is a compression/decompression library. It does not aim for maximum\ncompression, or compatibility with any other compression library; instead,\nit aims for very high speeds and reasonable compression. For instance,\ncompared to the fastest mode of zlib, Snappy is an order of magnitude faster\nfor most inputs, but the resulting compressed files are anywhere from 20% to\n100% bigger. (For more information, see \"Performance\", below.)\n\nSnappy has the following properties:\n\n * Fast: Compression speeds at 250 MB/sec and beyond, with no assembler code.\n   See \"Performance\" below.\n * Stable: Over the last few years, Snappy has compressed and decompressed\n   petabytes of data in Google's production environment. The Snappy bitstream\n   format is stable and will not change between versions.\n * Robust: The Snappy decompressor is designed not to crash in the face of\n   corrupted or malicious input.\n * Free and open source software: Snappy is licensed under a BSD-type license.\n   For more information, see the included COPYING file.\n\nSnappy has previously been called \"Zippy\" in some Google presentations\nand the like.\n\n\nPerformance\n===========\n\nSnappy is intended to be fast. On a single core of a Core i7 processor\nin 64-bit mode, it compresses at about 250 MB/sec or more and decompresses at\nabout 500 MB/sec or more. (These numbers are for the slowest inputs in our\nbenchmark suite; others are much faster.) In our tests, Snappy usually\nis faster than algorithms in the same class (e.g. LZO, LZF, QuickLZ,\netc.) while achieving comparable compression ratios.\n\nTypical compression ratios (based on the benchmark suite) are about 1.5-1.7x\nfor plain text, about 2-4x for HTML, and of course 1.0x for JPEGs, PNGs and\nother already-compressed data. Similar numbers for zlib in its fastest mode\nare 2.6-2.8x, 3-7x and 1.0x, respectively. More sophisticated algorithms are\ncapable of achieving yet higher compression rates, although usually at the\nexpense of speed. Of course, compression ratio will vary significantly with\nthe input.\n\nAlthough Snappy should be fairly portable, it is primarily optimized\nfor 64-bit x86-compatible processors, and may run slower in other environments.\nIn particular:\n\n - Snappy uses 64-bit operations in several places to process more data at\n   once than would otherwise be possible.\n - Snappy assumes unaligned 32 and 64-bit loads and stores are cheap.\n   On some platforms, these must be emulated with single-byte loads\n   and stores, which is much slower.\n - Snappy assumes little-endian throughout, and needs to byte-swap data in\n   several places if running on a big-endian platform.\n\nExperience has shown that even heavily tuned code can be improved.\nPerformance optimizations, whether for 64-bit x86 or other platforms,\nare of course most welcome; see \"Contact\", below.\n\n\nBuilding\n========\n\nYou need the CMake version specified in [CMakeLists.txt](./CMakeLists.txt)\nor later to build:\n\n```bash\ngit submodule update --init\nmkdir build\ncd build \u0026\u0026 cmake ../ \u0026\u0026 make\n```\n\nUsage\n=====\n\nNote that Snappy, both the implementation and the main interface,\nis written in C++. However, several third-party bindings to other languages\nare available; see the [home page](docs/README.md) for more information.\nAlso, if you want to use Snappy from C code, you can use the included C\nbindings in snappy-c.h.\n\nTo use Snappy from your own C++ program, include the file \"snappy.h\" from\nyour calling file, and link against the compiled library.\n\nThere are many ways to call Snappy, but the simplest possible is\n\n```c++\nsnappy::Compress(input.data(), input.size(), \u0026output);\n```\n\nand similarly\n\n```c++\nsnappy::Uncompress(input.data(), input.size(), \u0026output);\n```\n\nwhere \"input\" and \"output\" are both instances of std::string.\n\nThere are other interfaces that are more flexible in various ways, including\nsupport for custom (non-array) input sources. See the header file for more\ninformation.\n\n\nTests and benchmarks\n====================\n\nWhen you compile Snappy, the following binaries are compiled in addition to the\nlibrary itself. You do not need them to use the compressor from your own\nlibrary, but they are useful for Snappy development.\n\n* `snappy_benchmark` contains microbenchmarks used to tune compression and\n  decompression performance.\n* `snappy_unittests` contains unit tests, verifying correctness on your machine\n  in various scenarios.\n* `snappy_test_tool` can benchmark Snappy against a few other compression\n  libraries (zlib, LZO, LZF, and QuickLZ), if they were detected at configure\n  time. To benchmark using a given file, give the compression algorithm you want\n  to test Snappy against (e.g. --zlib) and then a list of one or more file names\n  on the command line.\n\nIf you want to change or optimize Snappy, please run the tests and benchmarks to\nverify you have not broken anything.\n\nThe testdata/ directory contains the files used by the microbenchmarks, which\nshould provide a reasonably balanced starting point for benchmarking. (Note that\nbaddata[1-3].snappy are not intended as benchmarks; they are used to verify\ncorrectness in the presence of corrupted data in the unit test.)\n\nContributing to the Snappy Project\n==================================\n\nIn addition to the aims listed at the top of the [README](README.md) Snappy\nexplicitly supports the following:\n\n1. C++11\n2. Clang (gcc and MSVC are best-effort).\n3. Low level optimizations (e.g. assembly or equivalent intrinsics) for:\n     - [x86](https://en.wikipedia.org/wiki/X86)\n     - [x86-64](https://en.wikipedia.org/wiki/X86-64)\n     - ARMv7 (32-bit)\n     - ARMv8 (AArch64)\n4. Supports only the Snappy compression scheme as described in\n  [format_description.txt](format_description.txt).\n5. CMake for building\n\nChanges adding features or dependencies outside of the core area of focus listed\nabove might not be accepted. If in doubt post a message to the\n[Snappy discussion mailing list](https://groups.google.com/g/snappy-compression).\n\nWe are unlikely to accept contributions to the build configuration files, such\nas `CMakeLists.txt`. We are focused on maintaining a build configuration that\nallows us to test that the project works in a few supported configurations\ninside Google. We are not currently interested in supporting other requirements,\nsuch as different operating systems, compilers, or build systems.\n\nContact\n=======\n\nSnappy is distributed through GitHub. For the latest version and other\ninformation, see https://github.com/google/snappy.\n","funding_links":[],"categories":["Compression"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/google.github.io%2Fsnappy%2F","html_url":"https://awesome.ecosyste.ms/projects/google.github.io%2Fsnappy%2F","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/google.github.io%2Fsnappy%2F/lists"}