summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README2
-rw-r--r--caja/caja-engrampa.c1
-rw-r--r--data/engrampa.appdata.xml.in2
-rw-r--r--data/engrampa.desktop.in.in2
-rw-r--r--data/packages.match1
-rw-r--r--src/fr-command-cfile.c23
-rw-r--r--src/fr-init.c2
7 files changed, 30 insertions, 3 deletions
diff --git a/README b/README
index 913c052..4e9a779 100644
--- a/README
+++ b/README
@@ -49,7 +49,7 @@
* ZIP Archived Comic Book (.cbz)
* ZOO Compressed Archive File (.zoo)
* Single files compressed with gzip (.gz), brotli (.br), bzip (.bz), bzip2 (.bz2), compress (.Z),
- lrzip (.lrz), lzip (.lz), lzop (.lzo), rzip(.rz), xz (.xz).
+ lrzip (.lrz), lzip (.lz), lzop (.lzo), rzip(.rz), xz (.xz), Zstandard (.zst).
* Home Page
diff --git a/caja/caja-engrampa.c b/caja/caja-engrampa.c
index 1851de0..3113394 100644
--- a/caja/caja-engrampa.c
+++ b/caja/caja-engrampa.c
@@ -203,6 +203,7 @@ static struct {
{ "application/x-zoo", TRUE },
{ "application/zip", TRUE },
{ "multipart/x-zip", TRUE },
+ { "application/zstd", TRUE },
{ NULL, FALSE }
};
diff --git a/data/engrampa.appdata.xml.in b/data/engrampa.appdata.xml.in
index 8b6bc3e..a624adb 100644
--- a/data/engrampa.appdata.xml.in
+++ b/data/engrampa.appdata.xml.in
@@ -34,7 +34,7 @@
<li>RAR Archived Comic Book (.cbr)</li>
<li>RPM Linux Package (.rpm) [Read-only mode]</li>
<li>Tape Archive File uncompressed (.tar) or compressed with: gzip (.tar.gz, .tgz), brotli (.tar.br), bzip (.tar.bz, .tbz), bzip2 (.tar.bz2, .tbz2),
- compress (.tar.Z, .taz), lrzip (.tar.lrz, .tlrz), lzip (.tar.lz, .tlz), lzop (.tar.lzo, .tzo), 7zip (.tar.7z), xz (.tar.xz)
+ compress (.tar.Z, .taz), lrzip (.tar.lrz, .tlrz), lzip (.tar.lz, .tlz), lzop (.tar.lzo, .tzo), 7zip (.tar.7z), xz (.tar.xz), Zstandard (.zst)
</li>
<li>Stuffit Archives (.bin, .sit)</li>
<li>ZIP Archive (.zip)</li>
diff --git a/data/engrampa.desktop.in.in b/data/engrampa.desktop.in.in
index 20284ce..628229d 100644
--- a/data/engrampa.desktop.in.in
+++ b/data/engrampa.desktop.in.in
@@ -9,7 +9,7 @@ Terminal=false
Type=Application
Icon=engrampa
Categories=GTK;Utility;Archiving;Compression;
-MimeType=application/x-7z-compressed;application/x-7z-compressed-tar;application/x-ace;application/x-alz;application/x-ar;application/x-arj;application/x-brotli;application/x-brotli-compressed-tar;application/x-bzip;application/x-bzip-compressed-tar;application/x-bzip1;application/x-bzip1-compressed-tar;application/x-cabinet;application/x-cbr;application/x-cbz;application/x-cd-image;application/x-compress;application/x-compressed-tar;application/x-cpio;application/vnd.debian.binary-package;application/x-ear;application/x-ms-dos-executable;application/x-gtar;application/x-gzip;application/x-gzpostscript;application/x-java-archive;application/x-lha;application/x-lhz;application/x-lrzip;application/x-lrzip-compressed-tar;application/x-lzip;application/x-lzip-compressed-tar;application/x-lzma;application/x-lzma-compressed-tar;application/x-lzop;application/x-lzop-compressed-tar;application/x-ms-wim;application/x-rar;application/x-rar-compressed;application/x-rpm;application/x-rzip;application/x-tar;application/x-tarz;application/x-stuffit;application/x-war;application/x-xz;application/x-xz-compressed-tar;application/x-zip;application/x-zip-compressed;application/x-zoo;application/zip;application/x-archive;application/vnd.ms-cab-compressed;
+MimeType=application/x-7z-compressed;application/x-7z-compressed-tar;application/x-ace;application/x-alz;application/x-ar;application/x-arj;application/x-brotli;application/x-brotli-compressed-tar;application/x-bzip;application/x-bzip-compressed-tar;application/x-bzip1;application/x-bzip1-compressed-tar;application/x-cabinet;application/x-cbr;application/x-cbz;application/x-cd-image;application/x-compress;application/x-compressed-tar;application/x-cpio;application/vnd.debian.binary-package;application/x-ear;application/x-ms-dos-executable;application/x-gtar;application/x-gzip;application/x-gzpostscript;application/x-java-archive;application/x-lha;application/x-lhz;application/x-lrzip;application/x-lrzip-compressed-tar;application/x-lzip;application/x-lzip-compressed-tar;application/x-lzma;application/x-lzma-compressed-tar;application/x-lzop;application/x-lzop-compressed-tar;application/x-ms-wim;application/x-rar;application/x-rar-compressed;application/x-rpm;application/x-rzip;application/x-tar;application/x-tarz;application/x-stuffit;application/x-war;application/x-xz;application/x-xz-compressed-tar;application/x-zip;application/x-zip-compressed;application/x-zoo;application/zip;application/x-archive;application/vnd.ms-cab-compressed;application/zstd;
Keywords=MATE;archive;manager;compression;
X-MATE-DocPath=engrampa/engrampa.xml
X-MATE-Bugzilla-Bugzilla=MATE
diff --git a/data/packages.match b/data/packages.match
index 4d80a4d..65b7981 100644
--- a/data/packages.match
+++ b/data/packages.match
@@ -29,4 +29,5 @@ unzip=
xz=
zip=
zoo=
+zstd=
diff --git a/src/fr-command-cfile.c b/src/fr-command-cfile.c
index 9b855a8..e71ea65 100644
--- a/src/fr-command-cfile.c
+++ b/src/fr-command-cfile.c
@@ -299,6 +299,14 @@ fr_command_cfile_add (FrCommand *comm,
compressed_filename = g_strconcat (filename, ".rz", NULL);
}
+ else if (is_mime_type (comm->mime_type, "application/zstd")) {
+ fr_process_begin_command (comm->process, "zstd");
+ fr_process_set_working_dir (comm->process, temp_dir);
+ fr_process_add_arg (comm->process, filename);
+ fr_process_end_command (comm->process);
+ compressed_filename = g_strconcat (filename, ".zst", NULL);
+ }
+
/* copy compressed file to the dest dir */
fr_process_begin_command (comm->process, "cp");
@@ -436,6 +444,14 @@ fr_command_cfile_extract (FrCommand *comm,
fr_process_end_command (comm->process);
}
+ else if (is_mime_type (comm->mime_type, "application/zstd")) {
+ fr_process_begin_command (comm->process, "zstd");
+ fr_process_add_arg (comm->process, "-f");
+ fr_process_add_arg (comm->process, "-d");
+ fr_process_add_arg (comm->process, temp_file);
+ fr_process_end_command (comm->process);
+ }
+
/* copy uncompress file to the dest dir */
uncompr_file = remove_extension_from_path (temp_file);
@@ -515,6 +531,7 @@ const char *cfile_mime_type[] = { "application/x-gzip",
"application/x-lzop",
"application/x-rzip",
"application/x-xz",
+ "application/zstd",
NULL };
@@ -571,6 +588,10 @@ fr_command_cfile_get_capabilities (FrCommand *comm,
if (is_program_available ("rzip", check_command))
capabilities |= FR_COMMAND_CAN_READ_WRITE;
}
+ else if (is_mime_type (mime_type, "application/zstd")) {
+ if (is_program_available ("zstd", check_command))
+ capabilities |= FR_COMMAND_CAN_READ_WRITE;
+ }
return capabilities;
}
@@ -610,6 +631,8 @@ fr_command_cfile_get_packages (FrCommand *comm,
return PACKAGES ("lzop");
else if (is_mime_type (mime_type, "application/x-rzip"))
return PACKAGES ("rzip");
+ else if (is_mime_type (mime_type, "application/zstd"))
+ return PACKAGES ("zstd");
return NULL;
}
diff --git a/src/fr-init.c b/src/fr-init.c
index c7c1995..748c79a 100644
--- a/src/fr-init.c
+++ b/src/fr-init.c
@@ -111,6 +111,7 @@ FrMimeTypeDescription mime_type_desc[] = {
{ "application/x-xz-compressed-tar", ".tar.xz", N_("Tar compressed with xz (.tar.xz)"), 0 },
{ "application/x-zoo", ".zoo", N_("Zoo (.zoo)"), 0 },
{ "application/zip", ".zip", N_("Zip (.zip)"), 0 },
+ { "application/zstd", ".zst", N_("Zstandard (.zst)"), 0 },
{ NULL, NULL, NULL, 0 }
};
@@ -180,6 +181,7 @@ FrExtensionType file_ext_type[] = {
{ ".Z", "application/x-compress" },
{ ".zip", "application/zip" },
{ ".zoo", "application/x-zoo" },
+ { ".zst", "application/zstd" },
{ NULL, NULL }
};