@property
    def size(self):
        """
        Returns the size (in bytes) of the HDU's data part.
        """

        # Note: On compressed files this might report a negative size; but the
        # file is corrupt anyways so I'm not too worried about it.
        if self._buffer is not None:
            return len(self._buffer) - self._data_offset

        return self._data_offset - self._file.size
dataset/ETHPy150Open spacetelescope/PyFITS/pyfits/hdu/base.py/_CorruptedHDU.size/swapped operands of `-`