-
Notifications
You must be signed in to change notification settings - Fork 3
License
ThomasPinna/python_zipfile_improvement
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
improvement of zipfile for a particular usecase, namely when you need a known set of files from a zip containing a lot more files The problem that's solved by this improvement http://stackoverflow.com/questions/37141286/efficiently-read-one-file-from-a-zip-containing-a-lot-of-files-in-python Note: It's quite hacky right now and much of the functionality is simply not tested since the change. function that helps you that is defined in zipfile.py def extractFilesFromZip(zip:str, filenamelist:list): setlist = set(filenamelist) with ZipFile(zip, to_extract=setlist, mode='r') as myzip: return [myzip.open(filename).read() for filename in setlist] This code comes without any guarantees: - I copied the zipfile code from pypy and edited to for my specific use case
About
No description, website, or topics provided.
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published