aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafał Mużyło <galtgendo@o2.pl>2020-04-24 05:48:36 -0400
committerMike Frysinger <vapier@gentoo.org>2020-04-24 05:48:36 -0400
commit9abf939441a6d38c512f8723d1c4e62a1f2af611 (patch)
tree2cb612e52f13e58f25ed648887e9f69778cdc02a
parentpackage with xz rather than lzma (diff)
downloadrpm2targz-9abf939441a6d38c512f8723d1c4e62a1f2af611.tar.gz
rpm2targz-9abf939441a6d38c512f8723d1c4e62a1f2af611.tar.bz2
rpm2targz-9abf939441a6d38c512f8723d1c4e62a1f2af611.zip
rpmoffset: add zstd support
URL: https://bugs.gentoo.org/719208 Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-rw-r--r--rpmoffset.c2
1 files changed, 2 insertions, 0 deletions
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