def __init__(self, data):
        assert(len(data) == self.HeaderLength)
        # Conveniently, the new ASCII format defines all fields (except for
        # the magic) to be 8 chars long, each field being a hex encoded
        # length.
        format = '6s' + '8s' * 13
        arr = struct.unpack(format, data)
        for slotName, val in zip(self.__slots__, arr):
            if slotName != 'magic':
                try:
                    val = int(val, 16)
                except __HOLE__:
                    raise InvalidFieldValue(val)
            setattr(self, slotName, val)
        # Pad to multiple of four, first the file name
        self.skip = self.pad(self.HeaderLength + self.namesize)
        # Then the file size
        self.skip += self.pad(self.filesize)
dataset/ETHPy150Open sassoftware/conary/conary/lib/cpiostream.py/CpioHeader.__init__