commit:     9abf939441a6d38c512f8723d1c4e62a1f2af611
Author:     Rafał Mużyło <galtgendo <AT> o2 <DOT> pl>
AuthorDate: Fri Apr 24 09:48:36 2020 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Fri Apr 24 09:48:36 2020 +0000
URL:        https://gitweb.gentoo.org/proj/rpm2targz.git/commit/?id=9abf9394

rpmoffset: add zstd support

URL: https://bugs.gentoo.org/719208
Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>

 rpmoffset.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/rpmoffset.c b/rpmoffset.c
index bd1f456..99a5c16 100644
--- a/rpmoffset.c
+++ b/rpmoffset.c
@@ -58,11 +58,13 @@ int is_magic_lzma(const char *buf)
 static const unsigned char magic_gzip[]  = { '\037', '\213', '\010' };
 static const unsigned char magic_bzip2[] = { 'B', 'Z', 'h' };
 static const unsigned char magic_xz[]    = { 0xFD, '7', 'z', 'X', 'Z', 0x00 };
+static const unsigned char magic_zstd[]  = { 0x28, 0xB5, 0x2F, 0xFD };
 static const magic_t magics[] = {
 #define DECLARE_MAGIC_T(t) { .type = #t, .magic = magic_##t, .len = 
sizeof(magic_##t), },
        DECLARE_MAGIC_T(gzip)
        DECLARE_MAGIC_T(bzip2)
        DECLARE_MAGIC_T(xz)
+       DECLARE_MAGIC_T(zstd)
 #undef DECLARE_MAGIC_T
 };
 #define MAGIC_SIZE_MIN 3

Reply via email to