Closed dartess closed 2 years ago
This is as expected, your alphabet starts with A, so A is "the zero value" (ie. numbers would start with 0 "0123456789").
Any time the first letter of a given base-x parameter characters string is at the beginning of the encoded string, an extra 0x00 byte is added to the beginning.
This is how the spec works.
Hey! I noticed strange behavior. Does it match the plan or not?
https://codesandbox.io/s/bold-burnell-i3uil?file=/src/index.js
In one of the cases, the number of characters in the buffer is greater than the required one by 1. The data itself is correct, but at the beginning there is a parasitic zero.