Skip to content

Commit

Permalink
Merge pull request #16 from lesthaeghet/master
Browse files Browse the repository at this point in the history
Bugfix for #15 for compressing large files
  • Loading branch information
allanlei committed May 6, 2016
2 parents d45fd94 + da7d3ed commit 2ebe493
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion zipstream/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,10 @@ def __write(self, filename=None, iterable=None, arcname=None, compress_type=None
else:
zinfo.compress_type = compress_type

zinfo.file_size = 0
if st:
zinfo.file_size = st[6]
else:
zinfo.file_size = 0
zinfo.flag_bits = 0x00
zinfo.flag_bits |= 0x08 # ZIP flag bits, bit 3 indicates presence of data descriptor
zinfo.header_offset = self.fp.tell() # Start of header bytes
Expand Down

0 comments on commit 2ebe493

Please sign in to comment.