mirror of
https://github.com/BLAKE3-team/BLAKE3
synced 2024-05-12 14:46:15 +02:00
add examples to the b3sum readme
This commit is contained in:
parent
fdd329ba57
commit
9f6104c8ed
|
@ -1,5 +1,9 @@
|
||||||
# b3sum
|
# 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
|
b3sum 0.2.1
|
||||||
|
|
||||||
|
@ -23,7 +27,27 @@ ARGS:
|
||||||
<file>...
|
<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:
|
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`,
|
install --path .`. Or you can just build with `cargo build --release`,
|
||||||
which puts the binary at `./target/release/b3sum`.
|
which puts the binary at `./target/release/b3sum`.
|
||||||
|
|
||||||
AVX-512 support (via C FFI, with dynamic CPU feature detection) and
|
By default, `b3sum` enables the assembly implementations, AVX-512
|
||||||
multi-threading (via Rayon) are enabled by default. Note that the
|
support, and multi-threading features of the underlying
|
||||||
underlying `blake3` crate does not enable those by default.
|
[`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.
|
||||||
|
|
Loading…
Reference in New Issue