nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
26.21k stars 3.95k forks source link

[Bug]: No compression on multi-file/folder downloads in the zip container #38456

Open dzidek23 opened 1 year ago

dzidek23 commented 1 year ago

⚠️ This issue respects the following points: ⚠️

Bug description

When downloading multiple files or a folder, the zip file has no compression on it.

If a folder in NC shows as 120MB in size, the output/downloaded zip will be roughly the same size. Unpacking the files and then repacking them with let say 7z (in my case) reduced the file by almost 40% (in my case 78MB).

Steps to reproduce

  1. Select multiple files/folder
  2. Download the file
  3. Downloaded zip has no compression enabled

File downloaded directly from NC: image

Same content after 7z compression: image

Expected behavior

Should we have compression enabled, so the resulting file is smaller?

I understand that there would be a penality for the system compressing files, but can't judge if it will outweigh the gains of transfer time.

Installation method

Community Manual installation with Archive

Nextcloud Server version

25

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.1

Web server

Apache (supported)

Database engine version

MySQL

Is this bug present after an update or on a fresh install?

None

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?

Configuration report

No response

List of activated Apps

Enabled:
  - activity: 2.17.0
  - announcementcenter: 6.6.1
  - cloud_federation_api: 1.8.0
  - comments: 1.15.0
  - contactsinteraction: 1.6.0
  - dashboard: 7.5.0
  - dav: 1.24.0
  - federatedfilesharing: 1.15.0
  - federation: 1.15.0
  - files: 1.20.1
  - files_accesscontrol: 1.15.1
  - files_automatedtagging: 1.15.3
  - files_external: 1.17.0
  - files_pdfviewer: 2.6.0
  - files_rightclick: 1.4.0
  - files_scripts: 2.2.1
  - files_sharing: 1.17.0
  - files_snapshots: 1.0.6
  - files_trackdownloads: 1.11.0
  - files_trashbin: 1.15.0
  - files_versions: 1.18.0
  - fileslibreofficeedit: 1.1.0
  - flow_notifications: 1.5.0
  - groupfolders: 13.1.3
  - logreader: 2.10.0
  - lookup_server_connector: 1.13.0
  - nextcloud_announcements: 1.14.0
  - notifications: 2.13.1
  - oauth2: 1.13.0
  - password_policy: 1.15.0
  - privacy: 1.9.0
  - provisioning_api: 1.15.0
  - recommendations: 1.4.0
  - related_resources: 1.0.4
  - richdocuments: 7.1.4
  - richdocumentscode: 22.5.1301
  - serverinfo: 1.15.0
  - settings: 1.7.0
  - sharebymail: 1.15.0
  - spreed: 15.0.5
  - survey_client: 1.13.0
  - suspicious_login: 4.3.0
  - systemtags: 1.15.0
  - tasks: 0.15.0
  - terms_of_service: 2.2.0
  - text: 3.6.0
  - theming: 2.0.1
  - twofactor_backupcodes: 1.14.0
  - updatenotification: 1.15.0
  - user_ldap: 1.15.0
  - user_status: 1.5.0
  - viewer: 1.9.0
  - weather_status: 1.5.0
  - workflowengine: 2.7.0

Nextcloud Signing status

No response

Nextcloud Logs

No response

Additional info

No response

szaimen commented 1 year ago

This is a feature request

joshtrichards commented 1 year ago

Looks like, at a minimum, we'd need to require the extension pecl_http to be installed. I'm not familiar with that extension so I can't speak to how realistic or not that is. Not what other hurdles there might be beyond that.

(We stream zip files so we can't use standard zip stuff in php).