Skip to content

Commit aa74894

Browse files
committed
docs
1 parent 62eebd2 commit aa74894

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

README.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
[![module](https://img.shields.io/badge/module-ESM%2FCJS-blue?style=flat-square)](README.md)
55
[![semantic versioning](https://img.shields.io/badge/semver-2.0.0-blue?logo=semver&style=flat-square)](https://semver.org/)
66
[![Common Changelog](https://nichoth.github.io/badge/common-changelog.svg)](./CHANGELOG.md)
7-
[![install size](https://flat.badgen.net/packagephobia/install/@substrate-system/baowser)](https://packagephobia.com/result?p=@substrate-system/baowser)
8-
[![gzip size](https://img.shields.io/bundlephobia/minzip/@substrate-system/baowser?style=flat-square)](https://bundlephobia.com/@substrate-system/name/package/baowser)
7+
[![install size](https://flat.badgen.net/packagephobia/install/@substrate-system/baowser?v=2)](https://packagephobia.com/result?p=@substrate-system/baowser)
8+
[![gzip size](https://flat.badgen.net/bundlephobia/minzip/@substrate-system/baowser)](https://bundlephobia.com/package/@substrate-system/baowser)
99
[![license](https://img.shields.io/badge/license-Big_Time-blue?style=flat-square)](LICENSE)
1010

1111

@@ -15,6 +15,11 @@ This is based on the [`bao` library](https://github.com/oconnor663/bao). That's
1515
where the name comes from. Also, look at
1616
[bab](https://github.com/worm-blossom/bab).
1717

18+
This is incremental verification for the browser. You can start a
19+
streaming download, and verify it is correct before you have downloaded the
20+
entire file. You only need to know the "root hash" ahead of time, and then
21+
you can verify each piece of the downlaod as it arrives.
22+
1823
[See a live demo](https://substrate-system.github.io/baowser/)
1924

2025
<details><summary><h2>Contents</h2></summary>
@@ -99,7 +104,7 @@ const encodedStream = createEncoder(chunkSize, fileData)
99104

100105
### Verification (Client-side)
101106

102-
The root hash is the only trusted input. The 32-byte hash is sufficient
107+
The root hash is the only trusted input. This 32-byte hash is sufficient
103108
for incremental verification. At each chunk in the stream,
104109
you can prove that the data corresponds to the root hash you requested.
105110

@@ -176,7 +181,7 @@ const { write } = require('@substrate-system/baowser/fs')
176181

177182
The encoding is a Merkle tree where hash labels are interleaved
178183
with data chunks in depth-first order.
179-
**The root hash (32 bytes) is your ONLY trusted input**.
184+
**The root hash (32 bytes) is your only trusted input**.
180185

181186
The stream contains all verification metadata (child node hashes),
182187
and that metadata is itself verified against the root hash during

0 commit comments

Comments
 (0)