{"id":18564232,"url":"https://github.com/notashelf/zid","last_synced_at":"2025-05-15T18:32:57.410Z","repository":{"id":240903117,"uuid":"803742702","full_name":"NotAShelf/zid","owner":"NotAShelf","description":"CID Trie implementation in Zig","archived":false,"fork":false,"pushed_at":"2024-05-21T09:55:53.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-11T15:46:18.599Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Zig","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/NotAShelf.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-21T09:54:41.000Z","updated_at":"2024-05-21T09:55:57.000Z","dependencies_parsed_at":"2024-05-21T11:34:33.897Z","dependency_job_id":"c543c026-cffd-4d24-9640-b98c280499c7","html_url":"https://github.com/NotAShelf/zid","commit_stats":null,"previous_names":["notashelf/zid"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotAShelf%2Fzid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotAShelf%2Fzid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotAShelf%2Fzid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotAShelf%2Fzid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NotAShelf","download_url":"https://codeload.github.com/NotAShelf/zid/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254397662,"owners_count":22064533,"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-06T22:14:39.116Z","updated_at":"2025-05-15T18:32:57.390Z","avatar_url":"https://github.com/NotAShelf.png","language":"Zig","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Zid\n\nZid is a Content Identifier (CID) Trie implementation in Zig.\n\n## Features\n\n- Trie structure for fast access to identifiers based on their byte values.\n- Proper manages memory allocation and deallocation.\n- Custom error types for better error reporting and handling.\n\n## Building\n\n1. Get the Zig compiler appropriate to your distribution (Generally, if you are\n   sane, `nix-shell -p zig`) will do the trick.)\n2. Clone the project\n3. `zig build` or `zig build-exe src/main.zig` (former is recommended, but\n   doesn't matter)\n\n## Usage\n\n\u003c!-- deno-fmt-ignore-start --\u003e\n\n\u003e [!CAUTION]\n\u003e Zid, for the time being, should be considered highly unstable and must be\n\u003e avoided in actual projects, unless you know what you are doing.\n\n\u003c!-- deno-fmt-ignore-end --\u003e\n\n### Adding Identifiers\n\nTo add an identifier to the trie, use the `add` method. Pass the identifier as a\nbyte slice (i.e. `[]u8`):\n\n```zig\ntry trie.add(\"your_identifier_here\");\n```\n\n### Searching for Identifiers\n\nTo search for an identifier in the trie, use the lookup method. Again, pass the\nidentifier as a byte slice:\n\n```zig\nconst result = try trie.lookup(\"identifier_to_search\");\n```\n\n## FAQ\n\n[IPFS docs]: https://docs.ipfs.tech/concepts/content-addressing/#what-is-a-cid\n\n### What the hell is a CID?\n\nSee [IPFS docs]. My interpretation of a CID Trie is a tree-like data structure\nused for _efficiently_ storing and retrieving identifiers, with efficiency being\nthe primary goal.\n\n### Why doesn't this build?\n\nIt's my first time building a Zig project. Call it a minor friction.\n\n## TODO\n\n- Support for Multiple Tries\n- Batch Operations\n- Dynamic MaxCIDLen (it's currently a runtime constant)\n- Persistence Layer\n- Concurrency\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnotashelf%2Fzid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnotashelf%2Fzid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnotashelf%2Fzid/lists"}