mfmts: Implements multiformats specification

[ agpl, codec, hash, library, protocol ] [ Propose Tags ] [ Report a vulnerability ]

Implments the multiformats specification used in IPFS and other distributed systems.


[Skip to Readme]

Flags

Manual Flags

NameDescriptionDefault
ci

CI Build options

Disabled
dev

Developer build options

Disabled

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 1.0.0.0, 1.0.0.1
Change log CHANGE_LOG.md
Dependencies array (>=0.5 && <0.6), base (>=4.18 && <5), basesystems (>=1.0 && <1.1), bytestring (>=0.11 && <0.12), containers (>=0.6 && <0.7), crypton (>=1.1 && <1.2), ram (>=0.20.1 && <0.23) [details]
License AGPL-3.0-or-later
Author Zoey McBride
Maintainer zoeymcbride@mailbox.org
Uploaded by z0 at 2026-04-01T22:21:52Z
Category Hash, Codec, Protocol
Source repo head: git clone https://git.sr.ht/~z0/mfmts
Distributions
Downloads 13 total (3 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]

Readme for mfmts-1.0.0.1

[back to package description]

mfmts

This project contains my implementation of the multiformats specifiation split across several individual libraries.

mfmts-multibase - Multibase BaseSystems encoding + decoding

Implements encoders and decoders for numeric basesytems and mutliformats specification for multibase prefix encoded strings.

References:

mfmts-varints - Unsigned VarInts

Provides parsing and serialization for multiformats unsigned binary varints.

References:

mfmts-multicodec - Magic Number specifications

Provides lookup table and query functions for codecs defined from multiformats multicodec. These are magic numbers that represent certain data encoded within CIDs, mulithash and other related projects. This module uses a python script to generate haskell code from the freshest table.csv on multicodec's GitHub.

References:

mfmts-multihash - Multicodec hash function identifiers

Provides a lookup table for hash functions in the mfmts-codec table and validates they have an implementation backend. This module is also used to verify the Multihash's Multicodec as part of decoding ContentIDs.

References:

mfmts-cid - CID/ContentID

Provides Parsing (from String), Extracting (from ByteString) and Serialization (to ByteString) for ContentIDs/CIDs.

References:

Unit testing

Some modules in this directory have unit tests that are generated within the python folder as JSON formats. Code for unit tests sets are found at the main ipfshs repo.

Reporting bugs

Bugs can be reported to the ipfshs ticket tracker.

Licensing

The mfmts project and its modules are free software and licensed under the AGPLv3 license. See LICENSE.txt.

Copyright (C) 2026 Zoey McBride <zoeymcbride@mailbox.org>