@classmethod
def endian_offset(cls, attrib, offset):
    """Adjust the byte offset according to the endianness"""
    if attrib == 'l':
        if offset % 2:
            return offset - 1
        else:
            return offset + 1
    elif attrib == 'b':
        return offset
    else:
        raise NotImplementedError('Bad MeP endianness')
