Skip to content

Commit

Permalink
added images from multiformats pres
Browse files Browse the repository at this point in the history
  • Loading branch information
jbenet committed Aug 14, 2016
1 parent 38d6f61 commit 22b8274
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,37 @@ They disagree. :(
Warning: **obviously multihash values bias the first two bytes**. Do not expect them to be uniformly distributed. The entropy size is `len(multihash) - 2`. Skip the first two bytes when using them with bloom filters, etc. Why not _ap_pend instead of _pre_pend? Because when reading a stream of hashes, you can know the length of the whole value, and allocate the right amount of memory, skip it, or discard it.

License: MIT

## Visual Examples

These are visual aids that help tell the story of why Multihash matters.

![](https://github.com/multiformats/multiformats/tree/eb22cd807db692877a9094b5bfb4d2997fd0278a/img/multihash.001.jpg)

#### Consider these 4 different hashes of same input

![](https://github.com/multiformats/multiformats/tree/eb22cd807db692877a9094b5bfb4d2997fd0278a/img/multihash.002.jpg)

#### Same length: 256 bits

![](https://github.com/multiformats/multiformats/tree/eb22cd807db692877a9094b5bfb4d2997fd0278a/img/multihash.003.jpg)

#### Different hash functions

![](https://github.com/multiformats/multiformats/tree/eb22cd807db692877a9094b5bfb4d2997fd0278a/img/multihash.004.jpg)

#### Idea: self-describe the values to distinguish

![](https://github.com/multiformats/multiformats/tree/eb22cd807db692877a9094b5bfb4d2997fd0278a/img/multihash.005.jpg)

#### Multihash: fn code + length prefix

![](https://github.com/multiformats/multiformats/tree/eb22cd807db692877a9094b5bfb4d2997fd0278a/img/multihash.006.jpg)

#### Multihash: a pretty good multiformat

![](https://github.com/multiformats/multiformats/tree/eb22cd807db692877a9094b5bfb4d2997fd0278a/img/multihash.007.jpg)

#### Multihash: has a bunch of implementations already

![](https://github.com/multiformats/multiformats/tree/eb22cd807db692877a9094b5bfb4d2997fd0278a/img/multihash.008.jpg)

0 comments on commit 22b8274

Please sign in to comment.