multicodec | Compact self-describing codecs | Computer Vision library
kandi X-RAY | multicodec Summary
kandi X-RAY | multicodec Summary
The code of a multicodec is usually encoded as unsigned varint as defined by multiformats/unsigned-varint. It is then used as a prefix to identify the data that follows.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Check the existence of the table .
multicodec Key Features
multicodec Examples and Code Snippets
Community Discussions
Trending Discussions on multicodec
QUESTION
I don't have any background with this subject.
To try to understand them better, I read:
From what I understand, the multihash
is the algorithm used to hash (one way) the value. so it means, we can't go back (we can't decode the hash to the value).
- I don't understand, in simple words, what is
multicodec
and if it's related to decoding the hash to a value (which makes no sense). - what is the motivation to
multicodec
prefix?
ANSWER
Answered 2021-Apr-09 at 15:23The
multicodec
is related to decoding the value the hash points to, if that makes it easier to understand. Don't worry, no magic hash decoding is happening ;). Remember we're making CIDs, and we can use CIDs to lookup content. However then we have the question of "how do we decode this data we just retrieved?", themulticodec
solves that problem for us. Reading From Data to Data Structures might help clear up some confusion.The
multicodec
prefix allows IPFS to evolve to support new and different encodings for the data that's actually put into IPFS. This refers to IPLD, and you can actually find the answer you're looking for under Links (with information about the codecs under Codecs):
For links we use a CID. A CID is an extension of
multihash
, in fact amultihash
is part of aCID
. We simply add a codec to amultihash
that tells us what format the data is in (JSON, CBOR, Bitcoin, Ethereum, etc). This way, we can actually link between data in different formats and any link to data anyone ever gives us can be decoded so that it can become more than just a series of bytes.CID is a standard that anyone can implement, even people that have no other interest in IPLD beyond the need for hash links to different data types can use it.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install multicodec
You can use multicodec like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page