--- tar-1.29/src/buffer.c 2016-03-14 20:58:16.000000000 +0000 +++ tar-1.29.1/src/buffer.c 2017-08-05 11:51:57.457112307 +0100 @@ -270,6 +270,8 @@ ct_lzip, ct_lzma, ct_lzop, + ct_lz4, + ct_zstd, ct_xz }; @@ -298,6 +300,8 @@ { ct_lzip, 4, "LZIP" }, { ct_lzma, 6, "\xFFLZMA" }, { ct_lzop, 4, "\211LZO" }, + { ct_lz4, 4, "\x04\x22\x4D\x18" }, + { ct_zstd, 4, "\x28\xB5\x2F\xFD" }, { ct_xz, 6, "\xFD" "7zXZ" }, }; @@ -313,6 +317,8 @@ { ct_lzma, LZMA_PROGRAM, "--lzma" }, { ct_lzma, XZ_PROGRAM, "-J" }, { ct_lzop, LZOP_PROGRAM, "--lzop" }, + { ct_lz4, LZ4_PROGRAM, "--lz4" }, + { ct_zstd, ZSTD_PROGRAM, "--zstd" }, { ct_xz, XZ_PROGRAM, "-J" }, { ct_none } }; --- tar-1.29/config.h.in 2016-05-16 09:52:47.000000000 +0100 +++ tar-1.29.1/config.h.in 2017-08-05 13:17:22.327294420 +0100 @@ -2190,6 +2190,9 @@ slash. */ #undef LSTAT_FOLLOWS_SLASHED_SYMLINK +/* Define to the program name of lz4 compressor program */ +#undef LZ4_PROGRAM + /* Define to the program name of lzip compressor program */ #undef LZIP_PROGRAM @@ -2454,6 +2457,9 @@ /* Define to the program name of xz compressor program */ #undef XZ_PROGRAM +/* Define to the program name of zstd compressor program */ +#undef ZSTD_PROGRAM + /* Enable large inode numbers on Mac OS X 10.5. */ #undef _DARWIN_USE_64_BIT_INODE --- tar-1.29/configure.ac 2016-05-16 09:51:12.000000000 +0100 +++ tar-1.29.1/configure.ac 2017-08-05 12:02:08.206629003 +0100 @@ -249,6 +249,8 @@ TAR_COMPR_PROGRAM(lzip) TAR_COMPR_PROGRAM(lzma) TAR_COMPR_PROGRAM(lzop) +TAR_COMPR_PROGRAM(lz4) +TAR_COMPR_PROGRAM(zstd) TAR_COMPR_PROGRAM(xz) AC_MSG_CHECKING(for default archive format) --- tar-1.29/src/suffix.c 2016-01-20 09:26:32.000000000 +0000 +++ tar-1.29.1/src/suffix.c 2017-08-05 12:57:33.987681075 +0100 @@ -43,6 +43,8 @@ { S(lzma, LZMA) }, { S(tlz, LZMA) }, { S(lzo, LZOP) }, + { S(lz4, LZ4) }, + { S(zst, ZSTD) }, { S(xz, XZ) }, { S(txz, XZ) }, /* Slackware */ { NULL } --- tar-1.29/src/tar.c 2016-03-24 05:42:14.000000000 +0000 +++ tar-1.29.1/src/tar.c 2017-08-05 11:31:35.793518014 +0100 @@ -293,6 +293,8 @@ LZIP_OPTION, LZMA_OPTION, LZOP_OPTION, + LZ4_OPTION, + ZSTD_OPTION, MODE_OPTION, MTIME_OPTION, NEWER_MTIME_OPTION, @@ -681,6 +683,8 @@ {"lzip", LZIP_OPTION, 0, 0, NULL, GRID+1 }, {"lzma", LZMA_OPTION, 0, 0, NULL, GRID+1 }, {"lzop", LZOP_OPTION, 0, 0, NULL, GRID+1 }, + {"lz4", LZ4_OPTION, 0, 0, NULL, GRID+1 }, + {"zstd", ZSTD_OPTION, 0, 0, NULL, GRID+1 }, {"xz", 'J', 0, 0, NULL, GRID+1 }, #undef GRID @@ -1125,6 +1129,14 @@ case LZOP_OPTION: s = xasprintf (_("filter the archive through %s"), LZOP_PROGRAM); + case LZ4_OPTION: + s = xasprintf (_("filter the archive through %s"), LZ4_PROGRAM); + break; + + case ZSTD_OPTION: + s = xasprintf (_("filter the archive through %s"), ZSTD_PROGRAM); + break; + case 'J': s = xasprintf (_("filter the archive through %s"), XZ_PROGRAM); break; @@ -1496,6 +1508,14 @@ set_use_compress_program_option (LZOP_PROGRAM, args->loc); break; + case LZ4_OPTION: + set_use_compress_program_option (LZ4_PROGRAM, args->loc); + break; + + case ZSTD_OPTION: + set_use_compress_program_option (ZSTD_PROGRAM, args->loc); + break; + case 'm': touch_option = true; break;