Commit Graph

4 Commits

Author SHA1 Message Date
Miloslav Trmač f42467020f Misc. warning cleanups
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-10-01 02:53:06 +02:00
Miloslav Trmač 3c5b510c94 Simplify ErrBadRequest.Error
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-09-12 16:31:50 +02:00
Giuseppe Scrivano 5494513f2e
chunked: fix build on other platforms
fix package build on !linux platforms

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-05-25 14:42:28 +02:00
Giuseppe Scrivano a0ff89e09d
pkg/chunked: new zstd variant zstd:chunked
add a new custom variant of the zstd compression that permits to
retrieve each file separately.

The idea is based on CRFS and its stargz format for having seekable
and indexable tarballs.

One disadvantage of the stargz format is that a custom file is added
to the tarball to store the layer metadata, and the metadata file is
part of the image itself.  Clients that are not aware of the stargz
format will propagate the metadata file inside of the containers.

The zstd compression supports embeddeding additional data as part of
the stream that the zstd decompressor will ignore (skippable frame),
so the issue above with CRFS can be solved directly within the zstd
compression format.

Beside this minor advantage, zstd is much faster and compresses better
than gzip, so take this opportunity to push the zstd format further.

The zstd compression is supported by the OCI image specs since August
2019: https://github.com/opencontainers/image-spec/pull/788 and has
been supported by containers/image since then.

Clients that are not aware of the zstd:chunked format, won't notice
any difference when handling a blob that uses the variant.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-05-07 11:29:28 +02:00