+#define OFFSET_7Z 53
+#define NO_OFFSET 0
+
+/* For perfomance reasons of 7z* we've choosen to decompress on the temporary
+ * directory instead of decompressing on the stdout */
+
+/**
+ * @extract: command line arguments to pass to extract a file from the archive
+ * to stdout.
+ * @list: command line arguments to list the archive contents
+ * @decompress_tmp: command line arguments to pass to extract the archive
+ * into a directory.
+ * @offset: the position offset of the filename on each line in the output of
+ * running the @list command
+ */
+typedef struct {
+ char *extract;
+ char *list;
+ char *decompress_tmp;
+ gint offset;
+} ComicBookDecompressCommand;
+
+static const ComicBookDecompressCommand command_usage_def[] = {
+ /* RARLABS unrar */
+ {"%s p -c- -ierr --", "%s vb -c- -- %s", NULL , NO_OFFSET},
+
+ /* GNA! unrar */
+ {NULL , "%s t %s" , "%s -xf %s %s" , NO_OFFSET},
+
+ /* unzip */
+ {"%s -p -C --" , "%s -Z -1 -- %s" , NULL , NO_OFFSET},
+
+ /* 7zip */
+ {NULL , "%s l -- %s" , "%s x -y %s -o%s", OFFSET_7Z},
+
+ /* tar */
+ {"%s -xOf" , "%s -tf %s" , NULL , NO_OFFSET}
+};