'Calculate the exploded size of file'

def _get_device_book_size(self, file, compressed_size):

    from calibre.utils.zipfile import ZipFile
    exploded_file_size = compressed_size
    format = file.rpartition('.')[2].lower()
    if (format == 'epub'):
        myZip = ZipFile(file, 'r')
        myZipList = myZip.infolist()
        exploded_file_size = 0
        for file in myZipList:
            exploded_file_size += file.file_size
        if False:
            logger().info(('    %s._get_device_book_size()' % self.__class__.__name__))
            logger().info(('        %d    items    in    archive' % len(myZipList)))
            logger().info(('        compressed:    %d        exploded:    %d' % (compressed_size, exploded_file_size)))
        myZip.close()
    return exploded_file_size
