'Parses the NXM_HEADER
Returns (type,has_mask,length)'

@staticmethod
def unpack_header(raw, offset):

    (h,) = struct.unpack_from('!L', raw, offset)
    offset += 4
    t = (h >> 9)
    has_mask = ((h & (1 << 8)) != 0)
    length = (h & 127)
    return (t, has_mask, length)
