Skip to content

Commit

Permalink
Merge pull request #23 from ipld/fix/add-cbor
Browse files Browse the repository at this point in the history
add cbor to lookup
  • Loading branch information
ianopolous authored Jun 8, 2023
2 parents 099132d + af1b55e commit 4dab46f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/io/ipfs/cid/Cid.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public CidEncodingException(String message, Throwable cause) {
}

public enum Codec {
Cbor(0x51),
Raw(0x55),
DagProtobuf(0x70),
DagCbor(0x71),
Expand All @@ -43,6 +44,7 @@ public enum Codec {
for (Codec c: Codec.values())
lookup.put(c.type, c);
// https://github.com/multiformats/multicodec/blob/master/table.csv
nameLookup.put("cbor", Cbor);
nameLookup.put("raw", Raw);
nameLookup.put("dag-pb", DagProtobuf);
nameLookup.put("dag-cbor", DagCbor);
Expand Down

0 comments on commit 4dab46f

Please sign in to comment.