Module util

Source
Expand description

Useful functions for implementing the Oku file system.

Functionsยง

entry_key_to_path
Converts a key of a replica entry into a path within a replica.
fmt
Format bytes as a base32-encoded lowercase string.
fmt_short
Format first ten bytes of a byte list as a base32-encoded lowercase string.
merge_tickets
Merge multiple tickets into one, returning None if no tickets were given.
parse_array
Parse a string as a base32-encoded byte array of length N.
parse_array_hex_or_base32
Parse a string either as a hex-encoded or base32-encoded byte array of length LEN.
path_to_entry_key
Converts a path to a key for an entry in a file system replica.
path_to_entry_prefix
Converts a path to a key prefix for entries in a file system replica.