{"id":22683251,"url":"https://github.com/mtchavez/countmin","last_synced_at":"2025-09-08T08:44:34.476Z","repository":{"id":18006004,"uuid":"21024428","full_name":"mtchavez/countmin","owner":"mtchavez","description":"CountMin sketching algorithm in golang","archived":false,"fork":false,"pushed_at":"2018-07-26T13:48:19.000Z","size":22,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-29T14:32:26.866Z","etag":null,"topics":["count-min-sketch","go","golang","sketching-algorithm"],"latest_commit_sha":null,"homepage":"","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/mtchavez.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2014-06-20T03:42:27.000Z","updated_at":"2023-12-25T03:37:35.000Z","dependencies_parsed_at":"2022-09-04T17:10:17.286Z","dependency_job_id":null,"html_url":"https://github.com/mtchavez/countmin","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/mtchavez/countmin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtchavez%2Fcountmin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtchavez%2Fcountmin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtchavez%2Fcountmin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtchavez%2Fcountmin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mtchavez","download_url":"https://codeload.github.com/mtchavez/countmin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtchavez%2Fcountmin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274159449,"owners_count":25232635,"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-08T02:00:09.813Z","response_time":121,"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":["count-min-sketch","go","golang","sketching-algorithm"],"created_at":"2024-12-09T21:11:23.138Z","updated_at":"2025-09-08T08:44:34.138Z","avatar_url":"https://github.com/mtchavez.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CountMin\n\n[![Latest Version](http://img.shields.io/github/release/mtchavez/countmin.svg?style=flat-square)](https://github.com/mtchavez/countmin/releases)\n[![Build Status](https://travis-ci.org/mtchavez/countmin.svg?branch=master)](https://travis-ci.org/mtchavez/countmin)\n[![Go Documentation](http://img.shields.io/badge/go-documentation-blue.svg?style=flat-square)](http://godoc.org/github.com/mtchavez/countmin)\n[![Go Report Card](https://goreportcard.com/badge/github.com/mtchavez/countmin)](https://goreportcard.com/report/github.com/mtchavez/countmin)\n[![Maintainability](https://api.codeclimate.com/v1/badges/9915ffa2990295885e85/maintainability)](https://codeclimate.com/github/mtchavez/countmin/maintainability)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/9915ffa2990295885e85/test_coverage)](https://codeclimate.com/github/mtchavez/countmin/test_coverage)\n\nCountMin sketching algorithm.\n\n## Install\n\nInstall package\n\n`go get -u github.com/mtchavez/countmin`\n\n## Usage\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/mtchavez/countmin\"\n)\n\nfunc main() {\n\tcm := countmin.New(10, 100000000)\n\tfor _, i := range []int64{1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1} {\n\t\tcm.Add([]byte(fmt.Sprintf(\"%d\", i)), int64(i))\n\t}\n\tfmt.Printf(\"Estimate of %d is %d\\n\", 1, cm.Count([]byte(\"1\")))\n\tfmt.Printf(\"Estimate of %d is %d\\n\", 3, cm.Count([]byte(\"3\")))\n\tfmt.Printf(\"Estimate of %d is %d\\n\", 9, cm.Count([]byte(\"9\")))\n\tfmt.Println(\"Size: \", cm.Size())\n\tfmt.Println(\"Err: \", cm.RelativeError())\n\tfmt.Println(\"Confidence: \", cm.Confidence())\n}\n```\n\n## Tests\n\nRun using `go test ./... --cover`\n\nRun benchmarks `go test --bench=.*`\n\n## TODO\n\n* Serialize/Deserialize\n* TCP / HTTP server wrappers\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmtchavez%2Fcountmin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmtchavez%2Fcountmin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmtchavez%2Fcountmin/lists"}