{"id":26675604,"url":"https://github.com/linkdata/bytecount","last_synced_at":"2025-08-30T12:36:58.527Z","repository":{"id":264144409,"uuid":"892458538","full_name":"linkdata/bytecount","owner":"linkdata","description":"Human readable byte count using KB, MB, GB etc","archived":false,"fork":false,"pushed_at":"2025-08-21T08:21:01.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-21T10:34:32.555Z","etag":null,"topics":["formatter","go","golang","human-readable","human-readable-numbers"],"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/linkdata.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,"zenodo":null}},"created_at":"2024-11-22T06:36:04.000Z","updated_at":"2025-08-21T08:20:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"7b3dae1e-91f7-4496-a28c-cb6c4ff6eab7","html_url":"https://github.com/linkdata/bytecount","commit_stats":null,"previous_names":["linkdata/bytecount"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/linkdata/bytecount","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linkdata%2Fbytecount","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linkdata%2Fbytecount/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linkdata%2Fbytecount/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linkdata%2Fbytecount/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/linkdata","download_url":"https://codeload.github.com/linkdata/bytecount/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linkdata%2Fbytecount/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272852277,"owners_count":25004052,"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-08-30T02:00:09.474Z","response_time":77,"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":["formatter","go","golang","human-readable","human-readable-numbers"],"created_at":"2025-03-26T03:18:52.147Z","updated_at":"2025-08-30T12:36:58.521Z","avatar_url":"https://github.com/linkdata.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![build](https://github.com/linkdata/bytecount/actions/workflows/go.yml/badge.svg)](https://github.com/linkdata/bytecount/actions/workflows/go.yml)\n[![coverage](https://github.com/linkdata/bytecount/blob/coverage/main/badge.svg)](https://htmlpreview.github.io/?https://github.com/linkdata/bytecount/blob/coverage/main/report.html)\n[![goreport](https://goreportcard.com/badge/github.com/linkdata/bytecount)](https://goreportcard.com/report/github.com/linkdata/bytecount)\n[![Docs](https://godoc.org/github.com/linkdata/bytecount?status.svg)](https://godoc.org/github.com/linkdata/bytecount)\n\n# bytecount\n\nGo pretty printer for byte counts.\n\nOnly depends on the standard library.\n\n## Usage\n\n`go get github.com/linkdata/bytecount`\n\nWhen printing byte counts using the `fmt` package, pass the values using `bytecount.N(n)`.\n\nYou may pass width and precision if you wish. The default is to keep the output to\na maximum of six characters while still showing as much precision as possible.\nThe highest byte count printable is 268435440QB (Quetta-bytes, 10\u0026#x00B3;\u0026#x2070;),\nexceeding this will print `+InfQB`.\n\nIf the formatting verb is `d` (e.g. `\"%d\"`), the divisor is 1000 rather than 1024.\n\nIf the formatting verb is `b` (e.g. `\"%b\"`), the value is multiplied by 8 and the\nunit suffix is changed from `B` (bytes) to `b` (bits).\n\nIf the `\"#\"` flag is given, no unit suffix is written.\n\nIf the `\" \"` flag is given, a space is written between the digits and the suffix.\n\n## Example\n\n```go\nimport (\n\t\"fmt\"\n\n\t\"github.com/linkdata/bytecount\"\n)\n\nfunc main() {\n\tfmt.Print(bytecount.N(53667551))\n\t// Output:\n\t// 51.2MB\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinkdata%2Fbytecount","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinkdata%2Fbytecount","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinkdata%2Fbytecount/lists"}