Skip to content

feat(packer): add compression support for extrafiles#102

Merged
stapelberg merged 1 commit into
gokrazy:mainfrom
damdo:add-compression-support-for-extrafiles
Jun 1, 2026
Merged

feat(packer): add compression support for extrafiles#102
stapelberg merged 1 commit into
gokrazy:mainfrom
damdo:add-compression-support-for-extrafiles

Conversation

@damdo

@damdo damdo commented May 27, 2026

Copy link
Copy Markdown
Contributor

GitHub has a hard limit of 100MB for extra files.
If these files are mostly text based (e.g. code), a quick win to circumvent this is to compress/decompress them.
This PR adds support for gzip compressed archives.

@damdo

damdo commented May 27, 2026

Copy link
Copy Markdown
Contributor Author

cc. @stapelberg

@damdo damdo closed this May 27, 2026
@damdo damdo reopened this May 27, 2026
@damdo

damdo commented May 27, 2026

Copy link
Copy Markdown
Contributor Author

Closing/reopening to kick off testing again

@stapelberg

Copy link
Copy Markdown
Contributor

Why not zstd? It’ll eventually be in the standard library, if that’s the reason you reached for gzip :) golang/go#62513

@damdo damdo force-pushed the add-compression-support-for-extrafiles branch from e15bcdb to a7d9f8b Compare May 28, 2026 10:25
@damdo

damdo commented May 28, 2026

Copy link
Copy Markdown
Contributor Author

Yeah I thought about zstd, I went with gzip for 2 reasons:

  1. as you guessed I used compress/gzip due to it being in the standard library (but it sounds like it'll be eventually, so this point falls)
  2. contrary to most linux distros which use GNU tar, there is no way to do zstd compression with the default tooling available on macOS with BSD tar

I am in favour of dropping gzip in favour of zstd (for mac users it'll require brew install zstd to be in place). It shouldn't be too much of a hassle for them if they ever wanted to do that.

@damdo

damdo commented May 28, 2026

Copy link
Copy Markdown
Contributor Author

Ok just pushed an update to use zstd.
I've tested it with https://github.com/damdo/gokrazy-go/tree/main/_gokrazy
Works as expected.

@damdo damdo closed this May 28, 2026
@damdo damdo reopened this May 28, 2026
@damdo

damdo commented May 28, 2026

Copy link
Copy Markdown
Contributor Author

Ready for a review :)

@stapelberg stapelberg merged commit e4396f9 into gokrazy:main Jun 1, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants