Skip to content

Commit 9b52b7f

Browse files
committed
Tweak docs
1 parent 104e82a commit 9b52b7f

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

blobby/README.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,24 @@ This crate provides encoding and decoding utilities for converting between
4242
the blobby format and text file with hex-encoded strings.
4343

4444
Let's say we have the following test vectors for a 64-bit hash function:
45+
```text
46+
COUNT = 0
47+
INPUT = 0123456789ABCDEF0123456789ABCDEF
48+
OUTPUT = 217777950848CECD
49+
50+
COUNT = 1
51+
INPUT =
52+
OUTPUT = F7CD1446C9161C0A
53+
54+
COUNT = 2
55+
INPUT = FFFEFD
56+
OUTPUT = 80081C35AA43F640
57+
58+
```
59+
60+
To transform it into the Blobby format you first have to modify it
61+
to the following format:
62+
4563
```text
4664
0123456789ABCDEF0123456789ABCDEF
4765
217777950848CECD
@@ -56,14 +74,14 @@ fourth, and sixth lines are hex-encoded hash outputs for input on the previous l
5674
Note that the file should contain a trailing empty line (i.e. every data line should end
5775
with `\n`).
5876

59-
We can encode this file into the Blobby format by running the following command:
77+
This file can be converted to the Blobby format by running the following command:
6078
```sh
6179
cargo run --releae --bin encode -- /path/to/input.txt /path/to/output.blb
6280
```
6381

64-
This will create a file which then can be read using `blobby::Blob2Iterator`.
82+
This will create a file which can be read using `blobby::Blob2Iterator`.
6583

66-
To see contents of a Blobby file you can use the following command:
84+
To see contents of an existing Blobby file you can use the following command:
6785
```sh
6886
cargo run --releae --bin decode -- /path/to/input.blb /path/to/output.txt
6987
```

0 commit comments

Comments
 (0)