When streaming zip content using SMBHandler and not writing the data to a file(streaming data out instead), the check at https://github.com/allanlei/python-zipstream/blob/master/zipstream/__init__.py#L328 detects that the data transferred (filesize) is greater than ZIP64_LIMIT. The Zip64 flag even after being set during initialization, has the variable zip64 set to False which cause the RuntimeError 'File size has increased during compressing'.
This is my proposed solution: We should only check the file size or the compress size when we are writing to a file i.e. filename is specified.
This solution works for my use case where I am streaming in/out data but I leave the actual implementation to fix this bug to the authors.
Hi, I've encountered the same issue. Fix recommended by rmathure works for me as well. Request that the pull request be approved or the base code updated. Thanks!
When streaming zip content using SMBHandler and not writing the data to a file(streaming data out instead), the check at https://github.com/allanlei/python-zipstream/blob/master/zipstream/__init__.py#L328 detects that the data transferred (filesize) is greater than ZIP64_LIMIT. The Zip64 flag even after being set during initialization, has the variable zip64 set to False which cause the RuntimeError 'File size has increased during compressing'.
This is my proposed solution: We should only check the file size or the compress size when we are writing to a file i.e. filename is specified.
This solution works for my use case where I am streaming in/out data but I leave the actual implementation to fix this bug to the authors.