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 #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.