source/projects/proquint
2021-08-03 19:28:13 -06:00
..
src/python Get proquint documented 2021-08-03 19:04:23 -06:00
test/python Get proquint documented 2021-08-03 19:04:23 -06:00
BUILD Simplify using py_project 2021-08-03 19:28:13 -06:00
README.md Get proquint documented 2021-08-03 19:04:23 -06:00
setup.cfg Bring in a (bugged) proquint 2021-08-03 08:42:36 -06:00
setup.py Get proquint documented 2021-08-03 19:04:23 -06:00

Proquint

An implementation of A Proposal for Proquints.

To summarize the paper, traditional decimal and hexadecimal codings are inconvenient for "large" bit-width identifiers. Decimal and hexadecimal codings offer no obvious dense enunciation and are traditionally presented without segmentation punctuation. The proquint format is a semantically dense coding for 16 bit hunks fitting within the enunciable space of English.

Demo

>>> from proquint import Proquint
>>> Proquint.encode_i16(0)
'babab'
>>> Proquint.encode_i16(1)
'babad'
>>> Proquint.encode_i64(14708250061244963317)
'subiv-gavab-sobiz-noluj'
>>> Proquint.decode('babad')
1

API Overview

proquint.Proquint.CONSONANTS

A string of consonants to use when encoding or decoding proquints. Must be of length 16.

proquint.Proquint.VOWELS

A string of vowels to use when encoding or decoding proquints. Must be of length 4.

proquint.Proquint.decode(buffer: str) -> int

Decode a proquint string to an integer value without restriction on bit-width.

proquint.Proquint.encode(val: int, width: int) -> str

Encode an integer into a string which will decode to the same value.

Note that the bit-width must be specified in order to determine the number of required segments.

proquint.Proquint.encode_{i16, i32, i64}(val: int) -> str

Helpers for encoding known-width quantities.

LICENSE

Copyright Reid 'arrdem' McKenzie August 2021.

Published under the terms of the MIT license.