Parse and check the CRC and length of the elements part of the memory

def _parse_and_check_elements(self, data):
        """
        Parse and check the CRC and length of the elements part of the memory
        """
        crc = data[-1]
        test_crc = crc32(data[:-1]) & 0x0ff
        elem_data = data[2:-1]
        if test_crc == crc:
            while len(elem_data) > 0:
                (eid, elen) = struct.unpack('BB', elem_data[:2])
                self.elements[self.element_mapping[eid]] = \
                    elem_data[2:2 + elen].decode('ISO-8859-1')
                elem_data = elem_data[2 + elen:]
            return True
        return False