racket/c/compress.h
Matthew Flatt 8ab973300d Add LZ4 support and use it by default for compressing files
original commit: bbcd7fc2188e798ce53b765db0808e9ea6510350
2019-03-20 13:35:04 -06:00

32 lines
810 B
C

#include "zlib.h"
struct lz4File;
typedef struct glzFile_r {
int mode;
union {
gzFile gz;
struct lz4File *lz4;
};
} *glzFile;
glzFile glzdopen_gz(int fd, const char *mode);
glzFile glzdopen_lz4(int fd, const char *mode);
glzFile glzdopen(int fd, const char *mode);
glzFile glzopen(const char *path, const char *mode);
#ifdef WIN32
glzFile glzopen_w(wchar_t *path, const char *mode);
#endif
int glzdirect(glzFile file);
int glzclose(glzFile file);
int glzread(glzFile file, void *buffer, unsigned int count);
int glzwrite(glzFile file, void *buffer, unsigned int count);
long glzseek(glzFile file, long offset, int whence);
int glzgetc(glzFile file);
int glzungetc(int c, glzFile file);
int glzrewind(glzFile file);
void glzerror(glzFile file, int *errnum);
void glzclearerr(glzFile fdfile);