#include <xtend/file.h>
-lxtend
ffile_t *xt_ffopen(const char *filename, int flags)
filename: Name of the file to be opened
mode: "r" or "w", passed to fopen() or popen()
xt_ffopen(3) opens a raw data file using fopen() or a gzipped, bzipped,
or xzipped file using popen(), returning a pointer to a ffile_t stream. Must
be used in conjunction with xt_ffclose() to ensure that ffclose() or
ffpclose() is called where appropriate.
The ffile_t system is simpler than and several times as fast as
FILE on typical systems. It is intended for processing large files
character-by-character, where low-level block I/O is not convenient, but
FILE I/O causes a bottleneck.
A pointer to the FILE structure or NULL if open failed
fopen(3), popen(3), gzip(1), bzip2(1), xz(1)