zipfile

Faster alternative to Python's zipfile module?

自古美人都是妖i 提交于 2020-08-01 09:50:15
问题 Is there a noticeably faster alternative to Python 2.7.4 zipfile module (with ZIP_DEFLATED) for zipping a large number of files into a single zip file? I had a look at czipfile https://pypi.python.org/pypi/czipfile/1.0.0, but that appears to be focused on faster decrypting (not compressing). I am routinely having to process a large number of image files (~12,000 files of a combination of .exr and .tiff files) with each file between ~1MB - 6MB in size (and ~9 GB for all the files) into a

Faster alternative to Python's zipfile module?

谁说我不能喝 提交于 2020-08-01 09:48:09
问题 Is there a noticeably faster alternative to Python 2.7.4 zipfile module (with ZIP_DEFLATED) for zipping a large number of files into a single zip file? I had a look at czipfile https://pypi.python.org/pypi/czipfile/1.0.0, but that appears to be focused on faster decrypting (not compressing). I am routinely having to process a large number of image files (~12,000 files of a combination of .exr and .tiff files) with each file between ~1MB - 6MB in size (and ~9 GB for all the files) into a

Damaged Downloaded Zip Files

二次信任 提交于 2020-07-31 04:19:13
问题 i've made a PHP form which contains an input[type=file] that only accepts zip format files. the zip file successfully uploads when the form is submitted. i have also created a download link for admin to download the file which has uploaded by the user. the problem is when the file is downloaded it has this error with it => "the archive is either in unknown format or damaged" i would be thankful if you help me here is my code : if (!empty($_FILES)){ foreach ($_FILES as $key=>$file){ $fileName

Getting “TypeError: pwd: expected bytes, got str” when extracting zip file with password

孤街浪徒 提交于 2020-05-15 21:53:20
问题 I want to unzip a specific named file located in a specific directory. The name of the file = happy.zip . The location = C:/Users/desktop/Downloads . I want to extract all the files to C:/Users/desktop/Downloads (the same location) I tried: import zipfile import os in_Zip = r"C:/Users/desktop/Downloads/happy.zip" outDir = r"C:/Users/desktop/Downloads" z = zipfile.ZipFile(in_Zip, 'r') z.extractall(outDir, pwd='1234!') z.close But I got: "TypeError: pwd: expected bytes, got str" 回答1: In Python