{"id":16752683,"url":"https://github.com/luser/read-byte-slice","last_synced_at":"2025-07-30T09:04:33.490Z","repository":{"id":62443760,"uuid":"102138211","full_name":"luser/read-byte-slice","owner":"luser","description":"A Rust crate for iterating over chunks of bytes as slices","archived":false,"fork":false,"pushed_at":"2022-01-06T16:17:34.000Z","size":13,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-10T16:12:47.383Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/luser.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-09-01T17:43:33.000Z","updated_at":"2022-01-06T16:17:37.000Z","dependencies_parsed_at":"2022-11-01T22:16:38.790Z","dependency_job_id":null,"html_url":"https://github.com/luser/read-byte-slice","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/luser/read-byte-slice","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luser%2Fread-byte-slice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luser%2Fread-byte-slice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luser%2Fread-byte-slice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luser%2Fread-byte-slice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/luser","download_url":"https://codeload.github.com/luser/read-byte-slice/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luser%2Fread-byte-slice/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267842974,"owners_count":24153133,"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-07-30T02:00:09.044Z","response_time":70,"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":[],"created_at":"2024-10-13T02:47:47.904Z","updated_at":"2025-07-30T09:04:33.447Z","avatar_url":"https://github.com/luser.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/luser/read-byte-slice.svg?branch=master)](https://travis-ci.org/luser/read-byte-slice) [![crates.io](https://img.shields.io/crates/v/read-byte-slice.svg)](https://crates.io/crates/read-byte-slice) [![](https://docs.rs/read-byte-slice/badge.svg)](https://docs.rs/read-byte-slice)\n\nThis crate implements a type `ByteSliceIter` that reads bytes from a reader and allows iterating\nover them as slices with a maximum length, similar to the [`chunks`] method on slices.\n\nIt is implemented as a [`FallibleStreamingIterator`] so that it can reuse its buffer and not\nallocate for each chunk. (That trait is re-exported here for convenience.)\n\n# Example\n```rust\nextern crate read_byte_slice;\n\nuse read_byte_slice::{ByteSliceIter, FallibleStreamingIterator};\nuse std::io;\n\nfn work() -\u003e io::Result\u003c()\u003e {\n  let bytes = b\"0123456789abcdef0123456789abcdef\";\n  // Iterate over the bytes in 8-byte chunks.\n  let mut iter = ByteSliceIter::new(\u0026bytes[..], 8);\n  while let Some(chunk) = iter.next()? {\n    println!(\"{:?}\", chunk);\n  }\n  Ok(())\n}\n\nfn main() {\n  work().unwrap();\n}\n```\n\n# License\n\n`read-byte-slice` is distributed under the terms of both the MIT license and\nthe Apache License (Version 2.0).\n\nSee LICENSE-APACHE and LICENSE-MIT for details.\n\n[`chunks`]: https://doc.rust-lang.org/std/primitive.slice.html#method.chunks\n[`FallibleStreamingIterator`]: https://docs.rs/fallible-streaming-iterator/*/fallible_streaming_iterator/trait.FallibleStreamingIterator.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluser%2Fread-byte-slice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluser%2Fread-byte-slice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluser%2Fread-byte-slice/lists"}