{"id":31363875,"url":"https://github.com/hokstadconsulting/purecdb","last_synced_at":"2025-09-27T05:35:39.637Z","repository":{"id":47383624,"uuid":"62488179","full_name":"hokstadconsulting/purecdb","owner":"hokstadconsulting","description":"A Pure Ruby CDB reader/writer w/64 bit extensions","archived":false,"fork":false,"pushed_at":"2021-09-01T23:51:46.000Z","size":31,"stargazers_count":16,"open_issues_count":3,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-09-07T21:46:28.326Z","etag":null,"topics":["cdb","hashtables","ruby"],"latest_commit_sha":null,"homepage":null,"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/hokstadconsulting.png","metadata":{"files":{"readme":"README.md","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}},"created_at":"2016-07-03T08:37:44.000Z","updated_at":"2023-07-17T20:01:48.000Z","dependencies_parsed_at":"2022-08-23T01:10:57.202Z","dependency_job_id":null,"html_url":"https://github.com/hokstadconsulting/purecdb","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hokstadconsulting/purecdb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hokstadconsulting%2Fpurecdb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hokstadconsulting%2Fpurecdb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hokstadconsulting%2Fpurecdb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hokstadconsulting%2Fpurecdb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hokstadconsulting","download_url":"https://codeload.github.com/hokstadconsulting/purecdb/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hokstadconsulting%2Fpurecdb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":277184497,"owners_count":25775363,"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-09-27T02:00:08.978Z","response_time":73,"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":["cdb","hashtables","ruby"],"created_at":"2025-09-27T05:35:37.824Z","updated_at":"2025-09-27T05:35:39.626Z","avatar_url":"https://github.com/hokstadconsulting.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PureCDB\n\nA Pure Ruby CDB reader/writer w/64 bit extensions\n\nFor information about CDB, see: http://cr.yp.to/cdb.html\n\nThe motivation for writing this was:\n\n * Bernstein's CDB format can only handle files up to 4GB. For a past project\n we needed a simple CDB style file for datasets several times that.\n \n * The C library is under a license that prevents us from releasing modified versions of it,\n but the format is so simple that writing our own reader and writer was easy.\n \n * We don't like depending on C extensions for Ruby code if we don't have to.\n\n\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'purecdb'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install purecdb\n\n## Basic Usage\n\nTo create a 32 bit (standard) CDB file:\n\n```ruby\n    PureCDB::Writer.open(\"/tmp/somecdbfile.cdb\") do |cdb| \n     cdb.store(\"key\",\"value\")\n    end\n```\n\nTo instead create a 64 bit file, pass {mode: 64} as the second argument to PureCDB::Writer#open .\n\n\nTo read a CDB file (auto-detecting standard 32-bit or extended 64-bit) CDB files:\n\n```ruby\n    PureCDB::Reader.open(\"/tmp/somecdbfile.cdb\") do |r|\n       p r.values(\"key\")\n    end\n```\n\nTo require a 32 or 64 bit file specifically, pass {mode: 32} or {mode: 64} as\nthe second argument to PureCDB::Reader#open.\n\nSee PureCDB::Reader#new for additional usage.\n\n\n## 64-bit Format\n\nThe 64 bit file format follows http://cr.yp.to/cdb/cdb.txt *except* that any\nreference to 32-bit should be replaced by 64-bit, and that a 64 bit file\n*ends* with the magic cookie \"cdb64:01\"\n\n\n\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run\n`bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To\nrelease a new version, update the version number in `version.rb`, and then run\n`bundle exec rake release` to create a git tag for the version, push git commits\nand tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\nTo run the Rspec tests, you need tinycdb or a command-line compatible implementation\ninstalled for interoperability tests.\n\n\n## Contributing\n\n1. Fork it ( https://github.com/hokstadconsulting/purecdb/fork )\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhokstadconsulting%2Fpurecdb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhokstadconsulting%2Fpurecdb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhokstadconsulting%2Fpurecdb/lists"}