You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey there! I'm loving this library for my fastapi + zipstream approach to generating zips on the fly. The only drawback is that I'm hitting the 4GB file limit because I'm trying to zip image sequences up.
Any chance I could convince you to take a stab at that?
By the way, you can pre-calculate the size of zip files beforehand using this function. It's very helpful when using this with something like fastapi because you can set the content-length header in the response so you get progress in the browser. You have to get this perfect for the download to work properly though.
So if you do end up wanting to tackle zip64, we'll have to figure out the different padding amounts that go with that.
defcalculate_zip_size(zip_queue: ZipQueue) ->int:
# This is pretty hard to do, directions found here though!# https://stackoverflow.com/questions/10927442/calculate-size-of-zip-file-with-compression-level-0/19380600file_count=0total_size=0filename_chars=""forfileinzip_queue:
info=os.stat(file['file']) # load file infototal_size+=info.st_size# size in bytesfilename_chars+=file['name'] # filenamefile_count+=1returnfile_count* (30+16+46) +2*len(filename_chars) +total_size+22
The text was updated successfully, but these errors were encountered:
Hi,
I liked this library. It gives me the exact solution what i want but now i want to download files more than 5GB. it gives error after 5GB it gives error like struct.error: 'L' format requires 0 <= number <= 4294967295.
I just searched and found in zipfile if we pass allowZip64=True parameter it solve the problem but as i see in documentation this library is not supporting it.
are you planning to handle it ?
Hey there! I'm loving this library for my fastapi + zipstream approach to generating zips on the fly. The only drawback is that I'm hitting the 4GB file limit because I'm trying to zip image sequences up.
Any chance I could convince you to take a stab at that?
By the way, you can pre-calculate the size of zip files beforehand using this function. It's very helpful when using this with something like fastapi because you can set the content-length header in the response so you get progress in the browser. You have to get this perfect for the download to work properly though.
So if you do end up wanting to tackle zip64, we'll have to figure out the different padding amounts that go with that.
The text was updated successfully, but these errors were encountered: