gzip: allow compressing empty files

This commit is contained in:
Eric Biggers 2016-10-23 13:54:52 -07:00
parent 8d0a43ac2e
commit 2b047b097b

View File

@ -291,6 +291,11 @@ err:
int
map_file_contents(struct file_stream *strm, u64 size)
{
if (size == 0) {
strm->mmap_size = 0;
return 0;
}
if (size > SIZE_MAX) {
msg("%"TS" is too large to be processed by this program",
strm->name);