def Decode(self, offset, size, value):
    return (value >> offset) & ((1 << size) - 1)