FastqPuri
|
Uncompress/compress input/output files using pipes. More...
#include <stdio.h>
Go to the source code of this file.
Macros | |
#define | READ_END 0 |
#define | WRITE_END 1 |
#define | PERMISSIONS 0640 |
Functions | |
int | setCloexec (int fd) |
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.
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.