{"id":18418588,"url":"https://github.com/bsm/cdb64","last_synced_at":"2025-04-07T13:31:19.814Z","repository":{"id":57484322,"uuid":"194506996","full_name":"bsm/cdb64","owner":"bsm","description":null,"archived":false,"fork":false,"pushed_at":"2023-01-10T14:12:57.000Z","size":18,"stargazers_count":3,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-22T19:02:32.143Z","etag":null,"topics":["cdb","golang","key-value","key-value-store"],"latest_commit_sha":null,"homepage":null,"language":"Go","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/bsm.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}},"created_at":"2019-06-30T11:13:38.000Z","updated_at":"2023-01-10T14:12:44.000Z","dependencies_parsed_at":"2023-02-08T19:00:31.702Z","dependency_job_id":null,"html_url":"https://github.com/bsm/cdb64","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsm%2Fcdb64","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsm%2Fcdb64/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsm%2Fcdb64/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsm%2Fcdb64/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bsm","download_url":"https://codeload.github.com/bsm/cdb64/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247661660,"owners_count":20975095,"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":["cdb","golang","key-value","key-value-store"],"created_at":"2024-11-06T04:14:05.267Z","updated_at":"2025-04-07T13:31:19.407Z","avatar_url":"https://github.com/bsm.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CDB64\n\n[![Build Status](https://travis-ci.org/bsm/cdb64.png?branch=master)](https://travis-ci.org/bsm/cdb64)\n[![GoDoc](https://godoc.org/github.com/bsm/cdb64?status.png)](http://godoc.org/github.com/bsm/cdb64)\n[![Go Report Card](https://goreportcard.com/badge/github.com/bsm/cdb64)](https://goreportcard.com/report/github.com/bsm/cdb64)\n[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n\nThis is a native Go implementation of [cdb][1], a constant key/value database\nwith some very nice properties, but without the 4GB size limit.\n\nAdapted from the original [design doc][1]:\n\n\u003e cdb is a fast, reliable, simple package for creating and reading constant databases. Its database structure provides several features:\n\u003e\n\u003e - Fast lookups: A successful lookup in a large database normally takes just two disk accesses. An unsuccessful lookup takes only one.\n\u003e - Low overhead: A database uses 4096 bytes, plus 32 bytes per record, plus the space for keys and data.\n\u003e - No random limits: cdb can handle any database up to 16 exabytes. There are no other restrictions; records don't even have to fit into memory. Databases are stored in a machine-independent format.\n\n[1]: http://cr.yp.to/cdb.html\n\nThis repo is based on github.com/chrislusf/cdb64\n\n## Usage\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\n\t\"github.com/bsm/cdb64\"\n)\n\nfunc main() {\n\tw, err := cdb64.Create(\"/tmp/cdb64-example.cdb\")\n\tif err != nil {\n\t\tlog.Fatalln(err)\n\t}\n\tdefer w.Close()\n\n\t// Write some key/value pairs.\n\t_ = w.Put([]byte(\"Alice\"), []byte(\"Hoax\"))\n\t_ = w.Put([]byte(\"Bob\"), []byte(\"Hope\"))\n\t_ = w.Put([]byte(\"Charlie\"), []byte(\"Horse\"))\n\n\t// Freeze and re-open it for reading.\n\tdb, err := w.Freeze()\n\tif err != nil {\n\t\tlog.Fatalln(err)\n\t}\n\tdefer db.Close()\n\n\t// Fetch a value.\n\tv, err := db.Get([]byte(\"Alice\"))\n\tif err != nil {\n\t\tlog.Fatalln(err)\n\t}\n\n\tfmt.Print(string(v))\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbsm%2Fcdb64","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbsm%2Fcdb64","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbsm%2Fcdb64/lists"}