docs: def corrupt_bytes(s, p=0.01, n=None):
      """Corrupt a given percentage or number of bytes from bytes"""
      s = bytes(s)
      s = array.array("B",s)
      l = len(s)
      if n is None:
          n = max(1,int(l*p))
      for i in random.sample(range(l), n):
          s[i] = (s[i]+random.randint(1,255))%256
      return s.tobytes()