lib/encoder: move definitions here and remove uint casts

This commit is contained in:
Nick Craig-Wood 2020-01-14 21:22:02 +00:00
parent 3c620d521d
commit c555dc71c2
5 changed files with 172 additions and 200 deletions

View file

@ -7,9 +7,16 @@ package encoder
// List of replaced characters:
// (0x00) -> '␀' // SYMBOL FOR NULL
// / (slash) -> '' // FULLWIDTH SOLIDUS
const Standard = MultiEncoder(
EncodeZero |
EncodeSlash |
EncodeCtl |
EncodeDel |
EncodeDot)
const Standard = (EncodeZero |
EncodeSlash |
EncodeCtl |
EncodeDel |
EncodeDot)
// Base only encodes the zero byte and slash
const Base = (EncodeZero |
EncodeSlash |
EncodeDot)
// Display is the internal encoding for logging and output
const Display = Standard