{"id":21534495,"url":"https://github.com/mzabaluev/chunked-bytes","last_synced_at":"2025-07-20T10:33:14.218Z","repository":{"id":57552942,"uuid":"268440087","full_name":"mzabaluev/chunked-bytes","owner":"mzabaluev","description":"A non-contiguous byte output buffer for Rust","archived":false,"fork":false,"pushed_at":"2021-01-28T05:25:47.000Z","size":122,"stargazers_count":14,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-11T13:10:09.523Z","etag":null,"topics":["buffers","input-output","rust","zero-copy"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/mzabaluev.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}},"created_at":"2020-06-01T06:13:16.000Z","updated_at":"2024-11-14T20:04:43.000Z","dependencies_parsed_at":"2022-09-26T18:51:41.349Z","dependency_job_id":null,"html_url":"https://github.com/mzabaluev/chunked-bytes","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/mzabaluev/chunked-bytes","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mzabaluev%2Fchunked-bytes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mzabaluev%2Fchunked-bytes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mzabaluev%2Fchunked-bytes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mzabaluev%2Fchunked-bytes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mzabaluev","download_url":"https://codeload.github.com/mzabaluev/chunked-bytes/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mzabaluev%2Fchunked-bytes/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266111435,"owners_count":23877980,"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":["buffers","input-output","rust","zero-copy"],"created_at":"2024-11-24T03:10:58.759Z","updated_at":"2025-07-20T10:33:14.187Z","avatar_url":"https://github.com/mzabaluev.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Chunked Bytes\n\nThis crate provides two variants of `ChunkedBytes`, a non-contiguous buffer\nfor efficient data structure serialization and vectored output.\n\nIn network programming, there is often a need to serialize data structures\ninto a wire protocol representation and send the resulting sequence of bytes\nto an output object, such as a socket. For a variety of reasons, developers\nof protocol implementations prefer to serialize the data into\nan intermediate buffer in memory rather than deal with output objects directly\nin either synchronous or asynchronous form, or both. When a contiguous\nbuffer like `Vec` is used for this, reallocations to fit a larger length of\nserialized data may adversely impact performance, while evaluating the required\nlength to pre-allocate beforehand may be cumbersome or difficult in the\ncontext. The single contiguous buffer also forms a boundary for write requests,\ncreating a need for copy-back schemes to avoid inefficiently fragmented writes\nof tail data.\n\nAnother important use case is passing network data through. If some of the data\nis received into [`Bytes`](https://docs.rs/bytes) handles, it should be possible\nto inject the data into the output stream without extra copying.\n\nEnter `ChunkedBytes`, containers that can be used to coalesce data added as\nbyte slices via the `BufMut` interface, as well as possible `Bytes` input,\ninto a sequence of chunks suitable for implementations of the\n[`Write::write_vectored`][write_vectored] method. This design aims to deliver\ngood performance regardless of the size of buffered data and with no need\nto pre-allocate sufficient capacity for it.\n\n[write_vectored]: https://doc.rust-lang.org/stable/std/io/trait.Write.html#method.write_vectored\n\n## License\n\nThis project is licensed under the [MIT license](LICENSE).\n\n### Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in `chunked-bytes` by you, shall be licensed as MIT, without any\nadditional terms or conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmzabaluev%2Fchunked-bytes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmzabaluev%2Fchunked-bytes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmzabaluev%2Fchunked-bytes/lists"}