This is not as random as it should be. The first byte will almost always be the same (indicating a 3 or 4 bytes value). When one generates a Unicode binary, it is sometimes because they want to make sure they can parse or validate that UTF-8 binary. If we only have 3 or 4 byte values then we are missing a lot of cases to look out for.
Just putting it out there for a later improvement.
When running
triq_dom:sample(triq_dom:unicode_binary(1)).
one will almost exclusively get 4 bytes binaries, with a few 3 bytes binaries.Example:
This is not as random as it should be. The first byte will almost always be the same (indicating a 3 or 4 bytes value). When one generates a Unicode binary, it is sometimes because they want to make sure they can parse or validate that UTF-8 binary. If we only have 3 or 4 byte values then we are missing a lot of cases to look out for.