This PR fixes single byte encoding issues caused by the use of unbound variable i in the odd length case.
It also adds a corresponding check in the decode function to discard impossible one char long encoded strings.
Tests were added to prevent regression.
This PR fixes single byte encoding issues caused by the use of unbound variable
i
in the odd length case. It also adds a corresponding check in the decode function to discard impossible one char long encoded strings. Tests were added to prevent regression.