codec

package
v0.0.0-...-89d9e6b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 3, 2025 License: GPL-3.0, LGPL-3.0 Imports: 0 Imported by: 0

Documentation

Overview

encoding contains all encodings. An encoding is defined as a transformation from (typically) any collection of types into a target type, often a primitive type. The most prevalent target type is (raw) bytes. However, big integer numbers may be encoded into uint limbs for purpose of efficient computation. Any target type gets its own package, such that encodings are easily located. 'encoding', as a package, is separated from std as it captures an interplay between two types, with varying source-types, and a predefined target-type. TODO consider adding Kim encoding (Douglas Crockford) for text encoding, as it is mere text representation. TODO consider adding Bitcoin's CompactSize unsigned integer encoding.

Directories

Path Synopsis
bytes contains all encodings that encode to, and decode from, (raw) bytes.
bytes contains all encodings that encode to, and decode from, (raw) bytes.
bigendian
FIXME this is redundant: "binary".BigEndian provides the same functionality (mostly).
FIXME this is redundant: "binary".BigEndian provides the same functionality (mostly).
compactsize
TODO return uint8 as we are guaranteed to read at most 9 bytes for a decode.
TODO return uint8 as we are guaranteed to read at most 9 bytes for a decode.
hex
littleendian
FIXME this is redundant: "binary".LittleEndian provides the same functionality (mostly).
FIXME this is redundant: "binary".LittleEndian provides the same functionality (mostly).
prefixed-compact
## Specification: "prefixed-compact"
## Specification: "prefixed-compact"
varint
Bitcoin VarInt encoding, used internally in Bitcoin Core.
Bitcoin VarInt encoding, used internally in Bitcoin Core.
int
number
string contains (generally) binary-to-text codecs.
string contains (generally) binary-to-text codecs.
base58
base58 is a binary-to-text codec that encodes into a ASCII/ANSI-string (single bytes) and decodes back to the original data in binary.
base58 is a binary-to-text codec that encodes into a ASCII/ANSI-string (single bytes) and decodes back to the original data in binary.
digit
digit contains textual (string) representations of digits.
digit contains textual (string) representations of digits.
uint

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL