It does not actually use Tupper's formula per se. First I have decoded it on paper and then I implemented decoding and encoding algorithms instead of calculating inequality, because reading binary data is quicker, than these direct and clever calculations.
Does not work on Safari due to lack of native BigInt support.