From 275c8c9334e4be73631b5066a8dc767a383c1a3e Mon Sep 17 00:00:00 2001 From: Frederic Marchal Date: Thu, 11 Jun 2015 18:25:41 +0200 Subject: [PATCH] Display an error when trying to read a Z file Z compressed files are not supported any longer because I want to use libraries instead of relying on external processes to parse compressed files. I haven't found a library or piece of code to read those files. It is my understanding that the Z format is not used much these days. If you think otherwise, please open a bug ticket. --- decomp.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/decomp.c b/decomp.c index 26873fe..28be907 100644 --- a/decomp.c +++ b/decomp.c @@ -339,6 +339,15 @@ FileObject *decomp(const char *arq) exit(EXIT_FAILURE); #endif } + else if (buf[0]==0x1F && (buf[1]==0x9D || buf[1]==0xA0))//LZW and LZH compressed file + { + debuga(__FILE__,__LINE__,_("Support for LZW and LZH compressed files was removed in sarg 2.4.\n" + "You can still read such a file with a command like this:\n" + " zcat \"%s\" | sarg - [your usual options here]\n" + "If you think it is important for sarg to read those files, open a bug ticket at .\n"), + arq); + exit(EXIT_FAILURE); + } else //normal file { fi=FileObject_FdOpen(fd); -- 2.39.2