{"id":16629235,"url":"https://github.com/wiggin77/nibs","last_synced_at":"2025-09-12T00:11:14.793Z","repository":{"id":57530116,"uuid":"118378326","full_name":"wiggin77/nibs","owner":"wiggin77","description":"Read streams of bytes in nibbles from 1 bit to 64 bits at a time.","archived":false,"fork":false,"pushed_at":"2024-01-18T22:56:12.000Z","size":18,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-18T05:14:42.243Z","etag":null,"topics":["bitreader","bytes","go","golang","golang-library","golang-package","nib","nibbles","readstream"],"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/wiggin77.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":"2018-01-21T22:09:36.000Z","updated_at":"2024-09-30T18:12:29.000Z","dependencies_parsed_at":"2024-06-20T12:03:22.774Z","dependency_job_id":null,"html_url":"https://github.com/wiggin77/nibs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiggin77%2Fnibs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiggin77%2Fnibs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiggin77%2Fnibs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiggin77%2Fnibs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wiggin77","download_url":"https://codeload.github.com/wiggin77/nibs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243076447,"owners_count":20232433,"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":["bitreader","bytes","go","golang","golang-library","golang-package","nib","nibbles","readstream"],"created_at":"2024-10-12T04:40:24.649Z","updated_at":"2025-03-11T16:43:47.261Z","avatar_url":"https://github.com/wiggin77.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nibs\n\n[![GoDoc](https://godoc.org/github.com/wiggin77/nibs?status.svg)](https://godoc.org/github.com/wiggin77/nibs)\n![Build Status](https://github.com/wiggin77/nibs/actions/workflows/go.yml/badge.svg)\n\nNibs is a Go package for reading streams of bytes in nibbles. Each nibble can be a number of bits in the range 1 bit to 64 bits inclusive.\n\n## Usage\n\n```go\n// provide an io.Reader\nb := []byte(\"this is a test\")\nbuf := bytes.NewReader(b)\n\n// create instance of Nibs\nnib := nibs.New(buf)\n\n// read until io.EOF,\nfor {\n  n, err := nib.Nibble8(4)\n  if err != nil {\n    break\n  }\n  fmt.Printf(\"nibbled 4 bits: %d\", n)\n}\n\n// once EOF is reached, there will be bits left over\n// if nibble sizes do not divide evenly into the `NibbleXX`\n// return type. Use `BitsRemaining` to determine how many.\nremaining, err := nib.BitsRemaining()\nif err == nil \u0026\u0026 remaining \u003e 0 {\n  n, err := nib.Nibble(remaining)\n  if err == nil {\n    fmt.Printf(\"nibbled %d remaining bits: %d\", remaining, n)\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwiggin77%2Fnibs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwiggin77%2Fnibs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwiggin77%2Fnibs/lists"}