nifti1_io
Macros | Functions
znzlib.c File Reference

Low level i/o interface to compressed and noncompressed files. Written by Mark Jenkinson, FMRIB. More...

#include "znzlib.h"
#include "znzlib_version.h"
Include dependency graph for znzlib.c:

Macros

#define ZNZ_MAX_BLOCK_SIZE   (1<<30)
 

Functions

znzFile znzopen (const char *path, const char *mode, int use_compression)
 
int Xznzclose (znzFile *file)
 
size_t znzread (void *buf, size_t size, size_t nmemb, znzFile file)
 
size_t znzwrite (const void *buf, size_t size, size_t nmemb, znzFile file)
 
znz_off_t znzseek (znzFile file, znz_off_t offset, int whence)
 
int znzrewind (znzFile stream)
 
znz_off_t znztell (znzFile file)
 
int znzputs (const char *str, znzFile file)
 

Detailed Description

Low level i/o interface to compressed and noncompressed files. Written by Mark Jenkinson, FMRIB.

This library provides an interface to both compressed (gzip/zlib) and uncompressed (normal) file IO. The functions are written to have the same interface as the standard file IO functions.

To use this library instead of normal file IO, the following changes are required:

NB: seeks for writable files with compression are quite restricted