{"id":18275760,"url":"https://github.com/davideuler/snappy","last_synced_at":"2025-04-09T04:13:50.649Z","repository":{"id":30220263,"uuid":"33771303","full_name":"davideuler/snappy","owner":"davideuler","description":"Automatically exported from code.google.com/p/snappy","archived":false,"fork":false,"pushed_at":"2015-04-11T10:13:08.000Z","size":2152,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-14T22:32:30.611Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"WebOfTrustInfo/rebooting-the-web-of-trust-spring2018","license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/davideuler.png","metadata":{"files":{"readme":"README","changelog":"ChangeLog","contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-04-11T10:10:36.000Z","updated_at":"2015-04-11T10:11:26.000Z","dependencies_parsed_at":"2022-08-22T14:40:40.607Z","dependency_job_id":null,"html_url":"https://github.com/davideuler/snappy","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/davideuler%2Fsnappy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davideuler%2Fsnappy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davideuler%2Fsnappy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davideuler%2Fsnappy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davideuler","download_url":"https://codeload.github.com/davideuler/snappy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247974731,"owners_count":21026742,"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-05T12:13:56.076Z","updated_at":"2025-04-09T04:13:50.630Z","avatar_url":"https://github.com/davideuler.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"Snappy, a fast compressor/decompressor.\n\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, FastLZ, 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\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 Google Code page at http://code.google.com/p/snappy/\nfor more information. Also, if you want to use Snappy from C code, you can\nuse the included C bindings 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  snappy::Compress(input.data(), input.size(), \u0026output);\n\nand similarly\n\n  snappy::Uncompress(input.data(), input.size(), \u0026output);\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, snappy_unittest is compiled in addition to the\nlibrary itself. You do not need it to use the compressor from your own library,\nbut it contains several useful components for Snappy development.\n\nFirst of all, it contains unit tests, verifying correctness on your machine in\nvarious scenarios. If you want to change or optimize Snappy, please run the\ntests to verify you have not broken anything. Note that if you have the\nGoogle Test library installed, unit test behavior (especially failures) will be\nsignificantly more user-friendly. You can find Google Test at\n\n  http://code.google.com/p/googletest/\n\nYou probably also want the gflags library for handling of command-line flags;\nyou can find it at\n\n  http://code.google.com/p/google-gflags/\n\nIn addition to the unit tests, snappy contains microbenchmarks used to\ntune compression and decompression performance. These are automatically run\nbefore the unit tests, but you can disable them using the flag\n--run_microbenchmarks=false if you have gflags installed (otherwise you will\nneed to edit the source).\n\nFinally, snappy can benchmark Snappy against a few other compression libraries\n(zlib, LZO, LZF, FastLZ and QuickLZ), if they were detected at configure time.\nTo benchmark using a given file, give the compression algorithm you want to test\nSnappy against (e.g. --zlib) and then a list of one or more file names on the\ncommand line. The testdata/ directory contains the files used by the\nmicrobenchmark, which should provide a reasonably balanced starting point for\nbenchmarking. (Note that baddata[1-3].snappy are not intended as benchmarks; they\nare used to verify correctness in the presence of corrupted data in the unit\ntest.)\n\n\nContact\n=======\n\nSnappy is distributed through Google Code. For the latest version, a bug tracker,\nand other information, see\n\n  http://code.google.com/p/snappy/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavideuler%2Fsnappy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavideuler%2Fsnappy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavideuler%2Fsnappy/lists"}