import array


def u16ToByteArray(u16):
    """Encodes the u16 value as a little endian byte (B) array."""
    return array.array('B', \
                       (  u16         % 256, \
                         (u16 // 256) % 256) );