{"id":17658629,"url":"https://github.com/ruuda/filebuffer","last_synced_at":"2025-04-09T19:20:00.178Z","repository":{"id":54396634,"uuid":"50747053","full_name":"ruuda/filebuffer","owner":"ruuda","description":"Fast and simple file reading for Rust","archived":false,"fork":false,"pushed_at":"2024-05-18T14:27:49.000Z","size":86,"stargazers_count":36,"open_issues_count":1,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-09T19:19:56.851Z","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/ruuda.png","metadata":{"files":{"readme":"readme.md","changelog":"changelog.md","contributing":"contributing.md","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":"2016-01-30T22:02:48.000Z","updated_at":"2025-03-14T19:17:58.000Z","dependencies_parsed_at":"2024-06-21T16:52:28.550Z","dependency_job_id":null,"html_url":"https://github.com/ruuda/filebuffer","commit_stats":{"total_commits":101,"total_committers":5,"mean_commits":20.2,"dds":0.03960396039603964,"last_synced_commit":"100f5e7a6b9a7d5f84e18681577d6c5513736970"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruuda%2Ffilebuffer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruuda%2Ffilebuffer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruuda%2Ffilebuffer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruuda%2Ffilebuffer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ruuda","download_url":"https://codeload.github.com/ruuda/filebuffer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248094991,"owners_count":21046770,"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":[],"created_at":"2024-10-23T15:27:39.882Z","updated_at":"2025-04-09T19:20:00.150Z","avatar_url":"https://github.com/ruuda.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"Filebuffer\n==========\nFast and simple file reading for Rust.\n\n[![Crates.io version][crate-img]][crate]\n[![Changelog][changelog-img]][changelog]\n[![Documentation][docs-img]][docs]\n\nFilebuffer can map files into memory. This is often faster than using the\nprimitives in `std::io`, and also more convenient. Furthermore this crate\noffers prefetching and checking whether file data is resident in physical\nmemory (so access will not incur a page fault). This enables non-blocking\nfile reading.\n\nExample\n-------\nBelow is an implementation of the `sha256sum` program that is both faster and\nsimpler than the naive `std::io` equivalent. (See `sha256sum_filebuffer` and\n`sha256sum_naive` in the examples directory.)\n\n```rust\nuse std::env;\nuse crypto::digest::Digest;\nuse crypto::sha2::Sha256;\nuse filebuffer::FileBuffer;\n\nextern crate crypto;\nextern crate filebuffer;\n\nfn main() {\n    for fname in env::args().skip(1) {\n        let fbuffer = FileBuffer::open(\u0026fname).expect(\"failed to open file\");\n        let mut hasher = Sha256::new();\n        hasher.input(\u0026fbuffer);\n        println!(\"{}  {}\", hasher.result_str(), fname);\n    }\n}\n```\n\nLicense\n-------\nFilebuffer is licensed under the [Apache 2.0][apache2] license. It may be used\nin free software as well as closed-source applications, both for commercial and\nnon-commercial use under the conditions given in the license. If you want to use\nFilebuffer in your GPLv2-licensed software, you can add an [exception][except]\nto your copyright notice.\n\n[crate-img]:     https://img.shields.io/crates/v/filebuffer.svg\n[crate]:         https://crates.io/crates/filebuffer\n[changelog-img]: https://img.shields.io/badge/changelog-online-blue.svg\n[changelog]:     https://github.com/ruuda/filebuffer/blob/master/changelog.md#changelog\n[docs-img]:      https://img.shields.io/badge/docs-online-blue.svg\n[docs]:          https://docs.rs/filebuffer\n[apache2]:       https://www.apache.org/licenses/LICENSE-2.0\n[except]:        https://www.gnu.org/licenses/gpl-faq.html#GPLIncompatibleLibs\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruuda%2Ffilebuffer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fruuda%2Ffilebuffer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruuda%2Ffilebuffer/lists"}