{"id":13486044,"url":"https://github.com/golang/snappy","last_synced_at":"2025-10-02T06:31:21.924Z","repository":{"id":31946657,"uuid":"35516397","full_name":"golang/snappy","owner":"golang","description":"The Snappy compression format in the Go programming language.","archived":false,"fork":false,"pushed_at":"2023-12-25T22:57:46.000Z","size":2351,"stargazers_count":1547,"open_issues_count":17,"forks_count":164,"subscribers_count":44,"default_branch":"master","last_synced_at":"2025-01-15T07:27:01.723Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/golang.png","metadata":{"files":{"readme":"README","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":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-05-12T22:48:31.000Z","updated_at":"2025-01-14T06:50:52.000Z","dependencies_parsed_at":"2023-12-25T23:33:02.903Z","dependency_job_id":"702a60c9-7091-4bd7-8bf0-e0234742f912","html_url":"https://github.com/golang/snappy","commit_stats":{"total_commits":135,"total_committers":16,"mean_commits":8.4375,"dds":"0.15555555555555556","last_synced_commit":"fa5810519dcbfaa60974183cbe11c6c0d050a23d"},"previous_names":["google/go-snappy"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golang%2Fsnappy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golang%2Fsnappy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golang%2Fsnappy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golang%2Fsnappy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/golang","download_url":"https://codeload.github.com/golang/snappy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234946607,"owners_count":18911512,"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-07-31T18:00:37.654Z","updated_at":"2025-10-02T06:31:21.603Z","avatar_url":"https://github.com/golang.png","language":"Go","funding_links":[],"categories":["开源类库","Awesome","Go","Open source library"],"sub_categories":["解压缩","Unzip"],"readme":"The Snappy compression format in the Go programming language.\n\nTo use as a library:\n$ go get github.com/golang/snappy\n\nTo use as a binary:\n$ go install github.com/golang/snappy/cmd/snappytool@latest\n$ cat decoded | ~/go/bin/snappytool -e \u003e encoded\n$ cat encoded | ~/go/bin/snappytool -d \u003e decoded\n\nUnless otherwise noted, the Snappy-Go source files are distributed\nunder the BSD-style license found in the LICENSE file.\n\n\n\nBenchmarks.\n\nThe golang/snappy benchmarks include compressing (Z) and decompressing (U) ten\nor so files, the same set used by the C++ Snappy code (github.com/google/snappy\nand note the \"google\", not \"golang\"). On an \"Intel(R) Core(TM) i7-3770 CPU @\n3.40GHz\", Go's GOARCH=amd64 numbers as of 2016-05-29:\n\n\"go test -test.bench=.\"\n\n_UFlat0-8         2.19GB/s ± 0%  html\n_UFlat1-8         1.41GB/s ± 0%  urls\n_UFlat2-8         23.5GB/s ± 2%  jpg\n_UFlat3-8         1.91GB/s ± 0%  jpg_200\n_UFlat4-8         14.0GB/s ± 1%  pdf\n_UFlat5-8         1.97GB/s ± 0%  html4\n_UFlat6-8          814MB/s ± 0%  txt1\n_UFlat7-8          785MB/s ± 0%  txt2\n_UFlat8-8          857MB/s ± 0%  txt3\n_UFlat9-8          719MB/s ± 1%  txt4\n_UFlat10-8        2.84GB/s ± 0%  pb\n_UFlat11-8        1.05GB/s ± 0%  gaviota\n\n_ZFlat0-8         1.04GB/s ± 0%  html\n_ZFlat1-8          534MB/s ± 0%  urls\n_ZFlat2-8         15.7GB/s ± 1%  jpg\n_ZFlat3-8          740MB/s ± 3%  jpg_200\n_ZFlat4-8         9.20GB/s ± 1%  pdf\n_ZFlat5-8          991MB/s ± 0%  html4\n_ZFlat6-8          379MB/s ± 0%  txt1\n_ZFlat7-8          352MB/s ± 0%  txt2\n_ZFlat8-8          396MB/s ± 1%  txt3\n_ZFlat9-8          327MB/s ± 1%  txt4\n_ZFlat10-8        1.33GB/s ± 1%  pb\n_ZFlat11-8         605MB/s ± 1%  gaviota\n\n\n\n\"go test -test.bench=. -tags=noasm\"\n\n_UFlat0-8          621MB/s ± 2%  html\n_UFlat1-8          494MB/s ± 1%  urls\n_UFlat2-8         23.2GB/s ± 1%  jpg\n_UFlat3-8         1.12GB/s ± 1%  jpg_200\n_UFlat4-8         4.35GB/s ± 1%  pdf\n_UFlat5-8          609MB/s ± 0%  html4\n_UFlat6-8          296MB/s ± 0%  txt1\n_UFlat7-8          288MB/s ± 0%  txt2\n_UFlat8-8          309MB/s ± 1%  txt3\n_UFlat9-8          280MB/s ± 1%  txt4\n_UFlat10-8         753MB/s ± 0%  pb\n_UFlat11-8         400MB/s ± 0%  gaviota\n\n_ZFlat0-8          409MB/s ± 1%  html\n_ZFlat1-8          250MB/s ± 1%  urls\n_ZFlat2-8         12.3GB/s ± 1%  jpg\n_ZFlat3-8          132MB/s ± 0%  jpg_200\n_ZFlat4-8         2.92GB/s ± 0%  pdf\n_ZFlat5-8          405MB/s ± 1%  html4\n_ZFlat6-8          179MB/s ± 1%  txt1\n_ZFlat7-8          170MB/s ± 1%  txt2\n_ZFlat8-8          189MB/s ± 1%  txt3\n_ZFlat9-8          164MB/s ± 1%  txt4\n_ZFlat10-8         479MB/s ± 1%  pb\n_ZFlat11-8         270MB/s ± 1%  gaviota\n\n\n\nFor comparison (Go's encoded output is byte-for-byte identical to C++'s), here\nare the numbers from C++ Snappy's\n\nmake CXXFLAGS=\"-O2 -DNDEBUG -g\" clean snappy_unittest.log \u0026\u0026 cat snappy_unittest.log\n\nBM_UFlat/0     2.4GB/s  html\nBM_UFlat/1     1.4GB/s  urls\nBM_UFlat/2    21.8GB/s  jpg\nBM_UFlat/3     1.5GB/s  jpg_200\nBM_UFlat/4    13.3GB/s  pdf\nBM_UFlat/5     2.1GB/s  html4\nBM_UFlat/6     1.0GB/s  txt1\nBM_UFlat/7   959.4MB/s  txt2\nBM_UFlat/8     1.0GB/s  txt3\nBM_UFlat/9   864.5MB/s  txt4\nBM_UFlat/10    2.9GB/s  pb\nBM_UFlat/11    1.2GB/s  gaviota\n\nBM_ZFlat/0   944.3MB/s  html (22.31 %)\nBM_ZFlat/1   501.6MB/s  urls (47.78 %)\nBM_ZFlat/2    14.3GB/s  jpg (99.95 %)\nBM_ZFlat/3   538.3MB/s  jpg_200 (73.00 %)\nBM_ZFlat/4     8.3GB/s  pdf (83.30 %)\nBM_ZFlat/5   903.5MB/s  html4 (22.52 %)\nBM_ZFlat/6   336.0MB/s  txt1 (57.88 %)\nBM_ZFlat/7   312.3MB/s  txt2 (61.91 %)\nBM_ZFlat/8   353.1MB/s  txt3 (54.99 %)\nBM_ZFlat/9   289.9MB/s  txt4 (66.26 %)\nBM_ZFlat/10    1.2GB/s  pb (19.68 %)\nBM_ZFlat/11  527.4MB/s  gaviota (37.72 %)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgolang%2Fsnappy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgolang%2Fsnappy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgolang%2Fsnappy/lists"}