summaryrefslogtreecommitdiff
path: root/Documentation/diff-config.txt
diff options
context:
space:
mode:
authorLibravatar René Scharfe <rene.scharfe@lsrfire.ath.cx>2013-01-06 16:20:57 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2013-01-06 11:35:26 -0800
commit5ea2c847c5938e9868f15a273869e54c6ed4c79c (patch)
tree3c89e6ccadee6bcfd31f310717c16d983fc91737 /Documentation/diff-config.txt
parentGit 1.7.12.4 (diff)
downloadtgif-5ea2c847c5938e9868f15a273869e54c6ed4c79c.tar.xz
archive-zip: write uncompressed size into header even with streaming
We record the uncompressed and compressed sizes and the CRC of streamed files as zero in the local header of the file. The actual values are recorded in an extra data descriptor after the file content, and in the usual ZIP directory entry at the end of the archive. While we know the compressed size and the CRC only after we processed the contents, we actually know the uncompressed size right from the start. And for files that we store uncompressed we also already know their final size. Do it like InfoZIP's zip and recored the known values, even though they can be reconstructed using the ZIP directory and the data descriptors alone. InfoZIP's unzip worked fine before, but NetBSD's version actually depends on these fields. The uncompressed size is already set by sha1_object_info(). We just need to initialize the compressed size to zero or the uncompressed size depending on the compression method (0 means storing). The CRC was propertly initialized already. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/diff-config.txt')
0 files changed, 0 insertions, 0 deletions