diff options
| author | Jack O'Connor <[email protected]> | 2020-02-19 16:38:02 -0500 |
|---|---|---|
| committer | Jack O'Connor <[email protected]> | 2020-02-19 16:48:53 -0500 |
| commit | 9f6104c8ed89c41199cbcfaea646e1966023e836 (patch) | |
| tree | 647732a2650f3f1eb85056ee40190076f00be906 /b3sum/README.md | |
| parent | fdd329ba57896faac4ae797775c175ad880cbe42 (diff) | |
add examples to the b3sum readme
Diffstat (limited to 'b3sum/README.md')
| -rw-r--r-- | b3sum/README.md | 34 |
1 files changed, 30 insertions, 4 deletions
diff --git a/b3sum/README.md b/b3sum/README.md index 35a9df9..80f5067 100644 --- a/b3sum/README.md +++ b/b3sum/README.md @@ -1,5 +1,9 @@ # b3sum +A command line utility for calculating +[BLAKE3](https://github.com/BLAKE3-team/BLAKE3) hashes, similar to +Coreutils tools like `b2sum` or `md5sum`. + ``` b3sum 0.2.1 @@ -23,7 +27,27 @@ ARGS: <file>... ``` -# Building +# Example + +Hash the file `foo.txt`: + +```bash +b3sum foo.txt +``` + +Time hashing a gigabyte of data, to see how fast it is: + +```bash +# Create a 1 GB file. +head -c 1000000000 /dev/zero > /tmp/bigfile +# Hash it with SHA-256. +time openssl sha256 /tmp/bigfile +# Hash it with BLAKE3. +time b3sum /tmp/bigfile +``` + + +# Installation The standard way to install `b3sum` is: @@ -39,6 +63,8 @@ If you want to install directly from this directory, you can run `cargo install --path .`. Or you can just build with `cargo build --release`, which puts the binary at `./target/release/b3sum`. -AVX-512 support (via C FFI, with dynamic CPU feature detection) and -multi-threading (via Rayon) are enabled by default. Note that the -underlying `blake3` crate does not enable those by default. +By default, `b3sum` enables the assembly implementations, AVX-512 +support, and multi-threading features of the underlying +[`blake3`](https://crates.io/crates/blake3) crate. To avoid this (for +example, if your C compiler does not support AVX-512), you can use +Cargo's `--no-default-features` flag. |
