Why zip and tar files when downloading from the webui? Why no compression?

While downloading files and folders from the webui, I noticed some will be converted to .zip and others to .tar, but as far as I can tell there is no compression applied… what is the logic here?

You can’t download more than one file at the same time on the WebUI.
So when you pick a folder or severals files, when you press download it brings them in a zip and you download all of them at the same time.

Thanks for the info. Is it possible to cue up a series of downloads, one after the other, rather than the zip format?

No, that’s not possible.

I know I know, this post is almost 4 yr old.

However, I’m looking at file/folder size and disk usage space and spotted one interesting thing.

In nextcloud a folder shows 120.2Mb in size:

When downloaded the .zip is just over 123.6Mb (I’ll put it down to file system differences)

image

But if I unpack the folder and then zip it with 7z I get only half the size.
image

So my question is, just like @just 's why NC doesnt compress zips before sending it to the browser? Would compression make a lot of difference on the whole process or wouldn’t be there overall gain for user downloading much smaller zip?

1 Like

I believe the ZIP archive which is being generated by the WebUI is basically just a container of the selected files and/or folder(s), hence a basic “create archive → put files/folder(s) in it → provide download” is being performed.

I don’t know what the actual code looks like but if what I believe is correct, a compression rate/level could be added with the ZipArchive::setCompressionIndex function