code: def apply(self, byte, value, data, i, count):
          
          if byte & self.mask == self.value:
              value <<= self.bits
              value |= byte & self.mask2
          else:
              raise UnicodeDecodeError(
                  NAME, data, i, i + count, "invalid {}-byte sequence".format(self.count)
              )
          return value
docs: Apply mask, compare to expected value, shift and return result.
          Eventually, this could become a ``reduce`` function.
  
          :param byte: The byte to compare
          :param value: The currently accumulated value.
          :param data: The data buffer, (array of bytes).
          :param i: The position within the data buffer.
          :param count: The position of this comparison.
          :return: A new value with the bits merged in.
          :raises UnicodeDecodeError: if marked bits don't match.