{"id":20122878,"url":"https://github.com/freaky/ruby-gcs","last_synced_at":"2025-08-16T09:09:57.909Z","repository":{"id":142942555,"uuid":"129293931","full_name":"Freaky/ruby-gcs","owner":"Freaky","description":"A small Ruby library for creating and searching Golomb Compressed Sets","archived":false,"fork":false,"pushed_at":"2018-04-21T00:15:12.000Z","size":16,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-02T20:30:50.042Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/Freaky.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2018-04-12T18:20:19.000Z","updated_at":"2020-11-12T01:24:47.000Z","dependencies_parsed_at":"2023-04-07T07:01:11.917Z","dependency_job_id":null,"html_url":"https://github.com/Freaky/ruby-gcs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Freaky/ruby-gcs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Freaky%2Fruby-gcs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Freaky%2Fruby-gcs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Freaky%2Fruby-gcs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Freaky%2Fruby-gcs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Freaky","download_url":"https://codeload.github.com/Freaky/ruby-gcs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Freaky%2Fruby-gcs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270690545,"owners_count":24628911,"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-08-16T02:00:11.002Z","response_time":91,"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":"2024-11-13T19:41:36.711Z","updated_at":"2025-08-16T09:09:57.883Z","avatar_url":"https://github.com/Freaky.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ruby-gcs\n\nThis is a small prerelease Ruby library for generating and querying\n[Golomb Compressed Set][1] databases, as produced by [gcstool][2].\n\nGolomb Compressed Sets are similar to [Bloom filters][3] - they're space-efficient\ndata structures that let you test whether a given element is a member of a set.\n\nLike Bloom filters, they have a controllable rate of false-positives - they may\nconsider an element a member of a set even if it's never been seen before - while\nhaving no false negatives.  If a GCS hasn't seen it, it's not on the list.\n\nTheir main benefit over Bloom filters is being a little more compact - particularly\nwith larger lists and better false-positive rates.\n\n## Usage\n\nruby-gcs comes with two small command-line utilities to create and query GCS databases.\n\n### bin/create\n\n    % wc -l /usr/share/dict/words\n      235924 words\n    % gzip --stdout -9 /usr/share/dict/words \u003ewords.gz \u0026\u0026 du -Ah words.gz\n      737K    words.gz\n    % bin/create 10000000 /usr/share/dict/words words-p10m.gcs\n    % du -Ah words-p10m.gcs\n      741K    words-p10m.gcs\n\nSo, about the same size as a gzip -9 file, at the expense of 1 in every 10 million\nqueries for words not in the dictionary being \"found\".\n\n### bin/query\n\n    % bin/query words-p10m.gcs\n    abiogenesis\n    Found in 0.77ms\n    llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch\n    Not found in 1.73ms\n\nRefer to these to see how the API works.\n\nThe full 500 million-strong pwned-passwords-2.0.txt imports to 1.5GB with a 1 in\n10 million false-positive rate - some improvement on the 9GB compressed hash list,\n30GB uncompressed text file, or 1.95GB Bloom filter.\n\nYou're advised to use gcstool for generating such large databases, as it's both much\nfaster (~20x) and much more memory efficient (~8x).\n\n## TODO\n\n * Test suite.\n * Less basic tools.\n * On-disk intermediate state for building large files.\n * Better documentation.\n * Plugin for [Rodauth][5].\n\n\n[1]: http://giovanni.bajo.it/post/47119962313/golomb-coded-sets-smaller-than-bloom-filters\n[2]: https://github.com/Freaky/gcstool\n[3]: https://en.wikipedia.org/wiki/Bloom_filter\n[4]: https://haveibeenpwned.com/Passwords\n[5]: http://rodauth.jeremyevans.net/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffreaky%2Fruby-gcs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffreaky%2Fruby-gcs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffreaky%2Fruby-gcs/lists"}