Skip to content

cryptidtech/multiutil

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

79 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Multiutil

Helpful traits, types, and functions for constructing multiformat types.

BaseEncoded

The BaseEncoded "smart pointer" wraps any multiformat type that implements the EncodingInfo trait also found in this crate. BaseEncoding automatically handles base encoding the inner value using the Multibase text encoding systems.

CodecInfo

The CodecInfo trait allows a multiformat type to expose its [Multicodec][MULTICODEC] value to code that relies on this trait.

Varuint

This is an implementation of a variable length, unsigned integer that is common to all multiformat protocols and types.

Varbytes

This is the combination of a Varuint followed by a binary octet array of equal length. This is a common way to encode arbitrary binary data so that any code can skip over the data if it doesn't know how, nor want, to process it

<varbytes> ::= <varuint> N(OCTET)
                   ^        ^
                  /          \
          count of            variable number
            octets            of octets

About

Helpful traits and functions common to multi* types.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages