$ npx -q @jimpick/cid-tool format -b base256unismush -v 1 bafybeifrtkrxkf3ildbhqojpr52nrk7i3s3we6qwtvw4vmkrycbzr6cki4
iJ˲ĨľꞌзӀ˹ĭˡˆᴳ˼Ȋƚῑ˸ᵋꞁᵝᵏɿˑ˾Ĭі˯ᴻꞌʿᴱϳЈᵻʶʳ
$ npx -q @jimpick/cid-tool base32 iJ˲ĨľꞌзӀ˹ĭˡˆᴳ˼Ȋƚῑ˸ᵋꞁᵝᵏɿˑ˾Ĭі˯ᴻꞌʿᴱϳЈᵻʶʳ
bafybeifrtkrxkf3ildbhqojpr52nrk7i3s3we6qwtvw4vmkrycbzr6cki4
When using a proportional font, the "unismushed" CID is half the size visually.
Multibase encoding | Encoded CID |
---|---|
base58 (CIDv0) | QmaHwdno7vA1kGWpRsFse9PN9iXYjQ2VsN7zxipKVZXzvJ |
base32 | bafybeifrtkrxkf3ildbhqojpr52nrk7i3s3we6qwtvw4vmkrycbzr6cki4 |
base256unismush | iJ˲ĨľꞌзӀ˹ĭˡˆᴳ˼Ȋƚῑ˸ᵋꞁᵝᵏɿˑ˾Ĭі˯ᴻꞌʿᴱϳЈᵻʶʳ |
It's a multibase encoding with 256 code points, using visually narrow unicode characters from multiple languages.
- I'm still iterating on what unicode characters to choose from and how to map them
- Line breaking behaviour is still a bit odd
- Some characters came from RTL languages (Arabic) or some other characters with special behaviours may have snuck in
- It would be nice if ASCII characters mapped to close thin relatives
- Not all fonts will have all the unicode characters selected -- needs cross-platform testing. Several characters are not available in mobile Safari on iOS.
More bytes, but more compact visually. Can still double-click and cut-and-paste. 1:1 mapping between glyphs and bytes.
Code is here: https://github.com/jimpick/js-multibase/blob/jim/base256unismush/src/constants.js#L76
I didn't need to change much - the difficult part was just finding the narrow glyphs.