]> git.ipfire.org Git - thirdparty/sarg.git/blob - documentation/decomp.txt
Fix the validation of the sarg log file name.
[thirdparty/sarg.git] / documentation / decomp.txt
1 /*!\file decomp.c
2 \brief Handle compressed log files.
3 */
4
5 /*! \fn FILE *decomp(const char *arq, bool *pipe)
6 Open the log file. If it is compressed, uncompress it through a pipe.
7
8 Log files compressed with gzip, bzip2 or compress are uncompressed with zcat or bzcat.
9
10 If the log file does not exist, the process terminates with an error message.
11
12 \param arq The log file to process.
13 \param pipe A variable set to \c true if the log file is opened through a pipe or set to \c false if the file is open directly.
14
15 \date 2009-09-24 - F Marchal\n
16 This function used to uncompress .Z files in place using uncompress but that required a write access to the log directory, could conflict with logrotate and could leave the log file uncompressed if sarg crashed. According to the documentation, zcat is capable of uncompressing .Z files so it is now used.
17
18 \date 2010-05-10 - F Marchal\n
19 The function doesn't use a temporary file any more and read the compressed file through a pipe.
20 */