Skip to main content

Module format

Module format 

Source
Expand description

Formatting utilities matching Python RNS output style.

Functions§

base32_decode
RFC 4648 Base32 decoding (standard alphabet, with padding).
base32_encode
RFC 4648 Base32 encoding (standard alphabet, with padding).
prettyfrequency
Format a frequency as a human-readable string. E.g., 3.5 per hour, 0.2 per minute, etc.
prettyhexrep
Format a destination hash as a hex string. Matches Python’s RNS.prettyhexrep().
prettytime
Format a duration in seconds as a human-readable string. Matches Python’s RNS.prettytime().
size_str
Format a byte count as a human-readable string. Matches Python’s RNS.prettysize().
speed_str
Format a bitrate as a human-readable string. Matches Python’s RNS.prettyspeed().