INNER CODE UNIT · Python
avgMBPerSecond
Ershany/Arcane-Engine · Setup/ArcaneUtils.py:80
avgMBPerSecond = avgKBPerSecond / 1024
avgSpeedString = '{:.2f} MB/s'.format(avgMBPerSecond)
sys.stdout.write('\r[{}{}] {:.2f}% ({}) '.format('█' * done, '.' * (50-done), percentage, avgSpeedString))
sys.stdout.flush()
sys.stdout.write('\n')
def UnzipFile(filepath, deleteZipFile=True):
zipFilePath = os.path.abspath(filepath) # get full path of files
zipFileLocation = os.path.dirname(zipFilePath)
zipFileContent = dict()
zipFileContentSize = 0
with ZipFile(zipFilePath, 'r') as zipFileFolder:
for name in zipFileFolder.namelist():
zipFileContent[name] = zipFileFolder.getinfo(name).file_size
zipFileContentSize = sum(zipFileContent.values())
extractedContentSize = 0
startTime = time.time()