google / google/go-containerregistry
pkg/v1/daemon should avoid compression
- Dominant language
- Go
- Stars
- 4k
- Forks
- 686
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 26
Description
`daemon.Write` dispatches to `tarball.Write` which writes `Compressed` layers for each blob.
If the layer is already compressed, this is probably fine. We don't waste any cycles gzipping blobs, piping the compressed bytes into the daemon should take less time, and the daemon can quickly uncompress on the other size.
_However_, if the incoming `v1.Image` has layers that haven't yet been compressed, we could avoid the expensive gzip by just writing the uncompressed blobs to the tarball, since the daemon doesn't care about digests at all.
cc @nkubala
This is somewhat related to https://github.com/google/go-containerregistry/pull/517
I'd like to fix streaming layers and the tarball package to avoid as much work as possible. The tarball package is way too eager and the stream package isn't flexible enough to do what I described.
Contributor guide
Assessment
This issue has not been assessed yet.