Skip to content

Commit 4dab46f

Browse files
authored
Merge pull request #23 from ipld/fix/add-cbor
add cbor to lookup
2 parents 099132d + af1b55e commit 4dab46f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main/java/io/ipfs/cid/Cid.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ public CidEncodingException(String message, Throwable cause) {
2020
}
2121

2222
public enum Codec {
23+
Cbor(0x51),
2324
Raw(0x55),
2425
DagProtobuf(0x70),
2526
DagCbor(0x71),
@@ -43,6 +44,7 @@ public enum Codec {
4344
for (Codec c: Codec.values())
4445
lookup.put(c.type, c);
4546
// https://github.com/multiformats/multicodec/blob/master/table.csv
47+
nameLookup.put("cbor", Cbor);
4648
nameLookup.put("raw", Raw);
4749
nameLookup.put("dag-pb", DagProtobuf);
4850
nameLookup.put("dag-cbor", DagCbor);

0 commit comments

Comments
 (0)