TagStr: int = 0x80
TagUTF8: int = 0x40
+# Here go invalid UTF-8 byte(s) strategies. We can fail in following
+# ways during decoding:
+# * invalid start byte -- hypothesis generates integers that will
+# satisfy that fail
+# * invalid continuation byte -- we strip last byte of multibyte
+# sequences
+# * unexpected end of data -- we strip the last byte of our data
+
+# 110xxxxx 10xxxxxx(STRIPPED)
invalid_utf8_2byte_s = integers(min_value=0, max_value=(1 << 5) - 1).map(
lambda v: bytes(bytearray([1 << 7 | 1 << 6 | v]))
)
+# 1110xxxx 10xxxxxx 10xxxxxx(STRIPPED)
invalid_utf8_3byte_s = integers(min_value=0, max_value=(1 << 10) - 1).map(
lambda v: bytes(bytearray([
(1 << 7 | 1 << 6 | 1 << 5 | (v >> 6)),