google / google/go-containerregistry

pkg/v1/daemon should avoid compression

Open
#552 2 comments 0 reactions 0 assignees View on GitHub
enhancement lifecycle/frozen
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.