Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
Utilities for encoding and decoding common formats like hex, base64, and varint
default
Utilities for encoding and decoding common formats like hex, base64, and varint.
Supported ascii85 standards for EncodeAscii85Options and
DecodeAscii85Options.
Decodes a ascii85-encoded string.
Options for decodeAscii85.
Decodes a base32-encoded string.
Decodes a base58-encoded string.
Decodes a base64-encoded string.
Decodes a given base64url-encoded string.
Decodes the given hex-encoded string. If the input is malformed, an error is thrown.
Given a non empty buf, starting at offset (default: 0), begin decoding bytes as
Varint encoded bytes, for a maximum of 10 bytes (offset + 10). The returned
tuple is of the decoded varint 32-bit number, and the new offset with which
to continue decoding other data.
Given a buf, starting at offset (default: 0), begin decoding bytes as
Varint encoded bytes, for a maximum of 5 bytes (offset + 5). The returned
tuple is of the decoded varint 32-bit number, and the new offset with which
to continue decoding other data.
Converts data into an ascii85-encoded string.
Converts data into a base32-encoded string.
Converts data into a base58-encoded string.
Converts data into a base64-encoded string.
Convert data into a base64url-encoded string.
Converts data into a hex-encoded string.
Takes unsigned number num and converts it into a Varint encoded
Uint8Array, returning a tuple consisting of a Uint8Array slice of the
encoded Varint, and an offset where the Varint encoded bytes end within the
Uint8Array.
The maximum value of an unsigned 64-bit integer.
Equivalent to 2n**64n - 1n
The maximum length, in bytes, of a Varint encoded 32-bit integer.
The maximum length, in bytes, of a Varint encoded 64-bit integer.
Supported ascii85 standards for EncodeAscii85Options and
DecodeAscii85Options.
Decodes a ascii85-encoded string.
Options for decodeAscii85.
Converts data into an ascii85-encoded string.
Decodes a base32-encoded string.
Converts data into a base32-encoded string.
Decodes a base58-encoded string.
Converts data into a base58-encoded string.
Decodes a base64-encoded string.
Converts data into a base64-encoded string.
Decodes a given base64url-encoded string.
Convert data into a base64url-encoded string.
hex
Port of the Go encoding/hex library.
unstable-base32-stream
Utilities for encoding and decoding to and from base32 in a streaming manner.
Decodes a base32-encoded stream into a Uint8Array stream.
Converts a Uint8Array stream into a base32-encoded stream.
unstable-base32crockford
Utilities for Crockford base32 encoding and decoding.
Decodes a Crockford base32-encoded string.
Converts data into a Crockford base32-encoded string.
unstable-base32hex
Utilities for base32hex encoding and decoding.
Decodes a base32hex-encoded string.
Converts data into a base32hex-encoded string.
unstable-base32hex-stream
Utilities for encoding and decoding to and from base32hex in a streaming manner.
Decodes a base32hex-encoded stream into a Uint8Array stream.
Converts a Uint8Array stream into a base32hex-encoded stream.
unstable-base64-stream
Utilities for encoding and decoding to and from base64 in a streaming manner.
Decodes a base64-encoded stream into a Uint8Array stream.
Converts a Uint8Array stream into a base64-encoded stream.
unstable-base64url-stream
Utilities for encoding and decoding to and from base64url in a streaming manner.
Decodes a base64url-encoded stream into a Uint8Array stream.
Converts a Uint8Array stream into a base64url-encoded stream.
unstable-hex-stream
Utilities for encoding and decoding to and from hex in a streaming manner.
Decodes a hex-encoded stream into a Uint8Array stream.
Converts a Uint8Array stream into a hex-encoded stream.
varint
Utilities for Varint encoding of typed integers. Varint encoding represents integers using a variable number of bytes, with smaller values requiring fewer bytes.
Given a non empty buf, starting at offset (default: 0), begin decoding bytes as
Varint encoded bytes, for a maximum of 10 bytes (offset + 10). The returned
tuple is of the decoded varint 32-bit number, and the new offset with which
to continue decoding other data.
Given a buf, starting at offset (default: 0), begin decoding bytes as
Varint encoded bytes, for a maximum of 5 bytes (offset + 5). The returned
tuple is of the decoded varint 32-bit number, and the new offset with which
to continue decoding other data.
Takes unsigned number num and converts it into a Varint encoded
Uint8Array, returning a tuple consisting of a Uint8Array slice of the
encoded Varint, and an offset where the Varint encoded bytes end within the
Uint8Array.
The maximum value of an unsigned 64-bit integer.
Equivalent to 2n**64n - 1n
The maximum length, in bytes, of a Varint encoded 32-bit integer.
The maximum length, in bytes, of a Varint encoded 64-bit integer.