{"id":44654213,"url":"https://github.com/compression-algorithm-research-lab/go-bit-buffer","last_synced_at":"2026-02-14T21:33:29.817Z","repository":{"id":203309869,"uuid":"709082414","full_name":"compression-algorithm-research-lab/go-bit-buffer","owner":"compression-algorithm-research-lab","description":"位数组，用于提供bit级别的线性数据结构方便操作","archived":false,"fork":false,"pushed_at":"2023-10-24T14:57:28.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-10-25T14:25:44.620Z","etag":null,"topics":[],"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/compression-algorithm-research-lab.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}},"created_at":"2023-10-24T01:17:56.000Z","updated_at":"2023-10-24T12:47:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"f1cc8875-b2da-43ab-81b3-dc3e04dd928c","html_url":"https://github.com/compression-algorithm-research-lab/go-bit-buffer","commit_stats":null,"previous_names":["compression-algorithm-research-lab/go-bit-buffer"],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/compression-algorithm-research-lab/go-bit-buffer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compression-algorithm-research-lab%2Fgo-bit-buffer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compression-algorithm-research-lab%2Fgo-bit-buffer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compression-algorithm-research-lab%2Fgo-bit-buffer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compression-algorithm-research-lab%2Fgo-bit-buffer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/compression-algorithm-research-lab","download_url":"https://codeload.github.com/compression-algorithm-research-lab/go-bit-buffer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compression-algorithm-research-lab%2Fgo-bit-buffer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29456272,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T21:29:27.764Z","status":"ssl_error","status_checked_at":"2026-02-14T21:28:11.111Z","response_time":53,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":"2026-02-14T21:33:29.151Z","updated_at":"2026-02-14T21:33:29.812Z","avatar_url":"https://github.com/compression-algorithm-research-lab.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-bit-buffer\n\n# 一、这是什么？\n\n可以申请一块bit缓存空间，可以一个bit一个bit的写入，用于方便进行位操作。\n\n# 二、安装\n\n```bash\ngo get -u github.com/compression-algorithm-research-lab/go-bit-buffer\n```\n\n# 三、API示例\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\tbit_buffer \"github.com/compression-algorithm-research-lab/go-bit-buffer\"\n)\n\nfunc main() {\n\n\t// 创建一块缓存空间，可以一个bit一个bit的往里面写\n\tbuffer := bit_buffer.New().Append(1).Append(0)\n\n\t// 转为二进制字符串\n\tbinaryString := buffer.ToBinaryString()\n\tfmt.Println(binaryString) // Output: 10000000\n\n\t// 转为字节数组\n\tbytes := buffer.Bytes()\n\tfmt.Println(bytes) // Output: [128]\n\n}\n```\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcompression-algorithm-research-lab%2Fgo-bit-buffer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcompression-algorithm-research-lab%2Fgo-bit-buffer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcompression-algorithm-research-lab%2Fgo-bit-buffer/lists"}