dollcodedollcode

Usage Info

The input type is detected automatically on entry.

Pressing the output will copy to the clipboard.

Input Types

  • Decimal: Positive integers up to 2^64 - 1
  • Hexadecimal: Must start with 0x (e.g., 0xFF)
  • Text: ASCII printable characters (codes: 32-126)
  • dollcode: ▖, ▘, and ▌ characters

Buffer Limits

  • Maximum decimal length: 20 (u64::MAX)
  • Maximum hexadecimal length: 18 (0x + u64::MAX)
  • Maximum text length: 100 ASCII-printable characters
  • Text encoding: variable length from 3-5 dollcode characters plus a zero-width joiner, resulting in an maximum output of 18 bytes per character

The output buffer is set so a max-length dollcode output can still be decoded.

What?

dollcode is a trinary encoding system. It uses three Unicode box-drawing characters to represent base-3 digits:

▖ = 1 | ▘ = 2 | ▌ = 3

Numbers are encoded by looping through and checking each modulus 3 result, then replacing it with one of the three characters.

Text is done by encoding each character's numeric ASCII code value into a variable-length dollcode sequence, appended with a zero-width joiner.

The most significant bit is on the left side.

Examples:

numbers: 1-16 → ▖ ▘ ▌ ▖▖ ▖▘ ▖▌ ▘▖ ▘▘ ▘▌ ▌▖ ▌▘ ▌▌ ▖▖▖ ▖▖▘ ▖▖▌ ▖▘▖

longer number: 42 → ▖▖▖▌ [1×27 + 1×9 + 1×3 + 3]

hexadecimal: 0xFF → ▘▘▌▌▌ [255 in decimal]

text: hey :] → ▌▘▖▘‍▌▖▌▘‍▖▖▖▖▖‍▌▖▘‍▖▌▖▖‍▘▌▌▌‍

Forged with ❤️ by ▌▖▌▘‍▌▘▌▖‍▌▖▌