{"id":21327542,"url":"https://github.com/jille/throughputbuffer","last_synced_at":"2025-03-16T00:14:13.214Z","repository":{"id":59046670,"uuid":"533246461","full_name":"Jille/throughputbuffer","owner":"Jille","description":"An efficient high throughput buffer in Go","archived":false,"fork":false,"pushed_at":"2024-02-27T16:05:20.000Z","size":22,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-22T12:45:48.586Z","etag":null,"topics":["buffer","golang","performance","throughput"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Jille.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}},"created_at":"2022-09-06T09:13:07.000Z","updated_at":"2024-01-20T07:26:22.000Z","dependencies_parsed_at":"2023-12-03T21:20:26.456Z","dependency_job_id":"5c153dca-ea7e-40bc-b921-4423d3d08c87","html_url":"https://github.com/Jille/throughputbuffer","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jille%2Fthroughputbuffer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jille%2Fthroughputbuffer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jille%2Fthroughputbuffer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jille%2Fthroughputbuffer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Jille","download_url":"https://codeload.github.com/Jille/throughputbuffer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243806075,"owners_count":20350775,"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":["buffer","golang","performance","throughput"],"created_at":"2024-11-21T21:18:10.191Z","updated_at":"2025-03-16T00:14:13.175Z","avatar_url":"https://github.com/Jille.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# throughputbuffer\n\n[![GoDoc](https://godoc.org/github.com/Jille/throughputbuffer?status.svg)](https://godoc.org/github.com/Jille/throughputbuffer)\n\nPackage throughputbuffer provides a high throughput indefinitely growing io.ReadWriter, like bytes.Buffer, but optimized for minimal copies.\nIt does the minimum amount of copies (1 per read + 1 per write) (or fewer through ReadFrom and WriteTo) and never has to move bytes in the buffer.\n\nByte slices are shared in a BufferPool. All byte slices are of the same length: the size given to New().\n\nBuffers automatically shrink as data is read from them (they return their data to the pool).\n\n```go\npackage main\n\nimport (\n\t\"crypto/rand\"\n\n\t\"github.com/Jille/throughputbuffer\"\n)\n\nfunc main() {\n\tpool := throughputbuffer.New(64 * 1024 * 1024)\n\n\tbuf1 := pool.Get()\n\tio.CopyN(buf1, rand.Reader, 1024 * 1024 * 1024)\n\tbuf2 := pool.Get()\n\tio.Copy(buf2, buf1) // As data is read from buf, the byteslices are freed and reused by buf2.\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjille%2Fthroughputbuffer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjille%2Fthroughputbuffer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjille%2Fthroughputbuffer/lists"}