[GH-ISSUE #852] Compress with xz for macOS and Linux GitHub Releases #409

Closed
opened 2026-04-12 10:04:06 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @coolaj86 on GitHub (Oct 20, 2023).
Original GitHub issue: https://github.com/ollama/ollama/issues/852

I am willing to help with this.

Why xz?

xz is a standard compression tool for binary files (just like gzip is a standard tool for compressing text files).

It comes preinstalled on macOS and most Linuxes (at least the ones used for desktop and server use, though not always in containers).

Double clicking an xz file will automatically unpack it - same as with zip or tar.

Size Comparison

Using default settings.

N/A xz bzip2 gzip
macOS 39 MB 9.8 MB (75%) 14 MB (64%) 14 MB (64%)
Linux x86 395 MB 162 MB (59%) 236 MB (40%) 249 MB (37%)
Linux ARM 380 MB 161 MB (58%) 235 MB (38%) 249 MB (34%)

I put bzip2 on there for comparison, even though it never really gained traction compared to xz and gzip, it does come installed by default on most systems.

Why Compress at All?

I realize that among the gigabytes of downloads a couple hundred MB is in the noise, but I'd like to make this available via Webi (https://webinstall.dev) and it's very "on-brand" to have things install very quickly with minimal overhead.

tar too?

Additionally, if it were packaged as .tar.xz, the execute bit could be preserved, which would make it just a little bit easier to install (no need to chmod a+x ./ollama-*).

note for the future: Windows 10 and 11 also have BSD tar.exe preinstalled (for about a decade now) which works for both .tar and .zip files, and works faster and more reliably that the native PowerShell alternative.

Compatibility with Automated Tools

This could also be in addition to the current release files rather than as a pure replacement so that other Webi-like tools that rely on the current release system aren't broken.

Originally created by @coolaj86 on GitHub (Oct 20, 2023). Original GitHub issue: https://github.com/ollama/ollama/issues/852 I am willing to help with this. ## Why `xz`? `xz` is a standard compression tool for binary files (just like `gzip` is a standard tool for compressing text files). It comes preinstalled on macOS and _most_ Linuxes (at least the ones used for desktop and server use, though not always in containers). Double clicking an `xz` file will automatically unpack it - same as with `zip` or `tar`. ## Size Comparison Using default settings. | | N/A | xz | bzip2 | gzip | | ---------- | ------------ | ---------------- |---------------- | ---------------- | | macOS | 39 MB | 9.8 MB (**75%**) | 14 MB (64%) | 14 MB (64%) | | Linux x86 | 395 MB | 162 MB (**59%**) | 236 MB (40%) | 249 MB (37%) | | Linux ARM | 380 MB | 161 MB (**58%**) | 235 MB (38%) | 249 MB (34%) | I put bzip2 on there for comparison, even though it never really gained traction compared to `xz` and `gzip`, it does come installed by default on most systems. ## Why Compress at All? I realize that among the gigabytes of downloads a couple hundred MB is in the noise, but I'd like to make this available via Webi (<https://webinstall.dev>) and it's very "on-brand" to have things install very quickly with minimal overhead. ## `tar` too? Additionally, if it were packaged as `.tar.xz`, the `execute` bit could be preserved, which would make it just a little bit easier to install (no need to `chmod a+x ./ollama-*`). note for the future: Windows 10 and 11 also have BSD tar.exe preinstalled (for about a decade now) which works for both `.tar` and `.zip` files, and works faster and more reliably that the native PowerShell alternative. ## Compatibility with Automated Tools This could also be in addition to the current release files rather than as a pure replacement so that other Webi-like tools that rely on the current release system aren't broken.
Author
Owner

@jmorganca commented on GitHub (Oct 26, 2023):

Hi @coolaj86, would love to consider supporting other formats of compression, however Ollama's updater requires .zip for the time being. I'll close this for now but we can re-open if this changes in the future

<!-- gh-comment-id:1780249967 --> @jmorganca commented on GitHub (Oct 26, 2023): Hi @coolaj86, would love to consider supporting other formats of compression, however Ollama's updater requires .zip for the time being. I'll close this for now but we can re-open if this changes in the future
Author
Owner

@coolaj86 commented on GitHub (Oct 26, 2023):

Could you add zip then?

Right now there's no compression at all.

<!-- gh-comment-id:1780425368 --> @coolaj86 commented on GitHub (Oct 26, 2023): Could you add zip then? Right now there's no compression at all.
Author
Owner

@coolaj86 commented on GitHub (Oct 26, 2023):

I just checked and none of the release binaries use zip:

https://github.com/jmorganca/ollama/releases

That said, you can upload in multiple formats. You don't have to stop uploading the unzipped binaries. And it would definitely be best to use xz or gzip on Linux since it doesn't have zip by default like macOS and Windows.

<!-- gh-comment-id:1780427670 --> @coolaj86 commented on GitHub (Oct 26, 2023): I just checked and none of the release binaries use zip: https://github.com/jmorganca/ollama/releases That said, you can upload in multiple formats. You don't have to stop uploading the unzipped binaries. And it would definitely be best to use xz or gzip on Linux since it doesn't have zip by default like macOS and Windows.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#409