|
static const char * | zcatExec (const char *path) |
|
static const char * | catExec (const char *path) |
| Commands to compress files. To be done in output.
|
|
static int | uncompress (const char *path) |
| Open a pipe to uncompress file. Open a pipe to uncompress the specified file. Not thread safe. More...
|
|
static int | compress (const char *path) |
| Open a pipe to compress output. Open a pipe to uncompress the specified file. Not thread safe. More...
|
|
int | setCloexec (int fd) |
|
static FILE * | funcompress (const char *path) |
| Open a pipe to uncompress the specified file. More...
|
|
static FILE * | fcompress (const char *path) |
| Open a pipe to compress the specified file. More...
|
|
FILE * | fopen_gen (const char *path, const char *mode) |
| Generalized fopen function. fopen_gen is to be used as fopen. Can be used in read and in write mode. When used in read mode with a compressed extension, the file will be first decompressed and then read. When used in write mode with a compressed extension, the output will be compressed. More...
|
|
Uncompress/compress input/output files using pipes.
Hook the standard file opening functions, open, fopen and fopen64. If the extension of the file being opened indicates the file is compressed (.gz, .bz2, .xz), when opening in the reading mode a pipe to a program is opened that decompresses that file (gunzip, bunzip2 or xzdec) and return a handle to the open pipe. When opening in the writing mode (only for .gz, .bam), a pipe to a program is opened that compresses the output.
- Author
- Paula Perez paula.nosp@m.pere.nosp@m.zrubi.nosp@m.o@gm.nosp@m.ail.c.nosp@m.om
- Date
- 03.08.2017
- Warning
- vfork vs fork to be checked!
- Note
- - original copyright note - (reading mode, original C++ code) author: Shaun Jackman sjack.nosp@m.man@.nosp@m.bcgsc.nosp@m..ca, https://github.com/bcgsc,
filename: Uncompress.cpp