summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README4
-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-archive.c1
-rw-r--r--src/fr-command-cfile.c22
-rw-r--r--src/fr-init.c2
8 files changed, 31 insertions, 4 deletions
diff --git a/README b/README
index 3e0a081..2b355e1 100644
--- a/README
+++ b/README
@@ -47,12 +47,12 @@
* ZIP Archive (.zip)
* ZIP Archived Comic Book (.cbz)
* ZOO Compressed Archive File (.zoo)
- * Single files compressed with gzip, bzip, bzip2, compress, lrzip, lzip,
+ * Single files compressed with gzip, brotli (.br), bzip, bzip2, compress, lrzip, lzip,
lzop, rzip, xz.
* Home Page
- http://www.mate-desktop.org/
+ https://mate-desktop.org/
* Licensing
diff --git a/caja/caja-engrampa.c b/caja/caja-engrampa.c
index 6247609..01f117a 100644
--- a/caja/caja-engrampa.c
+++ b/caja/caja-engrampa.c
@@ -159,6 +159,7 @@ static struct {
{ "application/x-alz", TRUE },
{ "application/x-ar", TRUE },
{ "application/x-arj", TRUE },
+ { "application/x-brotli", TRUE },
{ "application/x-bzip", TRUE },
{ "application/x-bzip-compressed-tar", TRUE },
{ "application/x-bzip1", TRUE },
diff --git a/data/engrampa.appdata.xml.in b/data/engrampa.appdata.xml.in
index a9bc4d0..999d6b3 100644
--- a/data/engrampa.appdata.xml.in
+++ b/data/engrampa.appdata.xml.in
@@ -33,7 +33,7 @@
<li>WinRAR Compressed Archive (.rar)</li>
<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), bzip (.tar.bz, .tbz), bzip2 (.tar.bz2, .tbz2),
+ <li>Tape Archive File uncompressed (.tar) or compressed with: gzip (.tar.gz, .tgz), brotli (.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)
</li>
<li>Stuffit Archives (.bin, .sit)</li>
diff --git a/data/engrampa.desktop.in.in b/data/engrampa.desktop.in.in
index 5f1a9db..f6aa477 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-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/x-deb;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-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/x-deb;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;
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 78b9fe3..4d80a4d 100644
--- a/data/packages.match
+++ b/data/packages.match
@@ -1,6 +1,7 @@
[Package Matches]
arj=
binutils=
+brotli=
bzip2=
cpio=
dpkg=
diff --git a/src/fr-archive.c b/src/fr-archive.c
index fcb4c82..8745498 100644
--- a/src/fr-archive.c
+++ b/src/fr-archive.c
@@ -552,6 +552,7 @@ get_mime_type_from_magic_numbers (GFile *file)
{ 0, 6, "7z\274\257\047\034", "application/x-7z-compressed" },
{ 7, 7, "**ACE**", "application/x-ace" },
{ 0, 2, "\x60\xea", "application/x-arj" },
+ { 0, 4, "\xce\xb2\xcf\x81", "application/x-brotli" },
{ 0, 3, "BZh", "application/x-bzip2" },
{ 0, 2, "\037\213", "application/x-gzip" },
{ 0, 4, "LZIP", "application/x-lzip" },
diff --git a/src/fr-command-cfile.c b/src/fr-command-cfile.c
index 463e156..0500df7 100644
--- a/src/fr-command-cfile.c
+++ b/src/fr-command-cfile.c
@@ -233,6 +233,14 @@ fr_command_cfile_add (FrCommand *comm,
fr_process_end_command (comm->process);
compressed_filename = g_strconcat (filename, ".gz", NULL);
}
+ else if (is_mime_type (comm->mime_type, "application/x-brotli")) {
+ fr_process_begin_command (comm->process, "brotli");
+ fr_process_set_working_dir (comm->process, temp_dir);
+ fr_process_add_arg (comm->process, "--");
+ fr_process_add_arg (comm->process, filename);
+ fr_process_end_command (comm->process);
+ compressed_filename = g_strconcat (filename, ".br", NULL);
+ }
else if (is_mime_type (comm->mime_type, "application/x-bzip")) {
fr_process_begin_command (comm->process, "bzip2");
fr_process_set_working_dir (comm->process, temp_dir);
@@ -364,6 +372,13 @@ fr_command_cfile_extract (FrCommand *comm,
fr_process_add_arg (comm->process, temp_file);
fr_process_end_command (comm->process);
}
+ else if (is_mime_type (comm->mime_type, "application/x-brotli")) {
+ fr_process_begin_command (comm->process, "brotli");
+ 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);
+ }
else if (is_mime_type (comm->mime_type, "application/x-bzip")) {
fr_process_begin_command (comm->process, "bzip2");
fr_process_add_arg (comm->process, "-f");
@@ -456,6 +471,7 @@ fr_command_cfile_extract (FrCommand *comm,
const char *cfile_mime_type[] = { "application/x-gzip",
+ "application/x-brotli",
"application/x-bzip",
"application/x-compress",
"application/x-lzip",
@@ -485,6 +501,10 @@ fr_command_cfile_get_capabilities (FrCommand *comm,
if (is_program_available ("gzip", check_command))
capabilities |= FR_COMMAND_CAN_READ_WRITE;
}
+ else if (is_mime_type (mime_type, "application/x-brotli")) {
+ if (is_program_available ("brotli", check_command))
+ capabilities |= FR_COMMAND_CAN_READ_WRITE;
+ }
else if (is_mime_type (mime_type, "application/x-bzip")) {
if (is_program_available ("bzip2", check_command))
capabilities |= FR_COMMAND_CAN_READ_WRITE;
@@ -538,6 +558,8 @@ fr_command_cfile_get_packages (FrCommand *comm,
{
if (is_mime_type (mime_type, "application/x-gzip"))
return PACKAGES ("gzip");
+ else if (is_mime_type (mime_type, "application/x-brotli"))
+ return PACKAGES ("brotli");
else if (is_mime_type (mime_type, "application/x-bzip"))
return PACKAGES ("bzip2");
else if (is_mime_type (mime_type, "application/x-compress"))
diff --git a/src/fr-init.c b/src/fr-init.c
index 751cdcd..2927458 100644
--- a/src/fr-init.c
+++ b/src/fr-init.c
@@ -65,6 +65,7 @@ FrMimeTypeDescription mime_type_desc[] = {
{ "application/x-ar", ".a", N_("Ar (.a)"), 0 },
{ "application/x-ar", ".ar", N_("Ar (.ar)"), 0 },
{ "application/x-arj", ".arj", N_("Arj (.arj)"), 0 },
+ { "application/x-brotli", ".br", N_("brotli (.br)"), 0 },
{ "application/x-bzip", ".bz2", NULL, 0 },
{ "application/x-bzip-compressed-tar", ".tar.bz2", N_("Tar compressed with bzip2 (.tar.bz2)"), 0 },
{ "application/x-bzip1", ".bz", NULL, 0 },
@@ -119,6 +120,7 @@ FrExtensionType file_ext_type[] = {
{ ".ar", "application/x-ar" },
{ ".arj", "application/x-arj" },
{ ".bin", "application/x-stuffit" },
+ { ".br", "application/x-brotli" },
{ ".bz", "application/x-bzip" },
{ ".bz2", "application/x-bzip" },
{ ".cab", "application/vnd.ms-cab-compressed" },