mirror of
https://github.com/BLAKE3-team/BLAKE3
synced 2024-04-19 16:33:59 +02:00
cb32f0bd14
New methods: - update_reader - update_mmap - update_mmap_rayon These are more discoverable, more convenient, and safer. There are two problems I want to avoid by taking a `Path` instead of a `File`. First, exposing `Mmap` objects to the caller is fundamentally unsafe, and making `maybe_mmap_file` private avoids that issue. Second, taking a `File` raises questions about whether memory mapped reads should behave like regular file reads. (Should they respect the current seek position? Should they update the seek position?) Taking a `Path` from the caller and opening the `File` internally avoids these questions. |
||
---|---|---|
.. | ||
main.rs | ||
unit_tests.rs |