diff options
author | Thomas White <taw@physics.org> | 2020-02-11 11:42:21 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2020-02-11 11:42:21 +0100 |
commit | a607da9373e4cbf8609fac477ef5ecd3323ca234 (patch) | |
tree | b5e083ba61d76a714859a11e3318d71695b931e5 /libcrystfel/src/image.c | |
parent | 6f2ca6294851780290877c387ada86744bbbebc6 (diff) |
Don't use gzbuffer if it's not available
Enables compatability with zlib < 1.2.3.5
Diffstat (limited to 'libcrystfel/src/image.c')
-rw-r--r-- | libcrystfel/src/image.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libcrystfel/src/image.c b/libcrystfel/src/image.c index 9768e15d..6358a9d0 100644 --- a/libcrystfel/src/image.c +++ b/libcrystfel/src/image.c @@ -787,8 +787,10 @@ static float *read_cbf_data(struct imagefile *f, int *w, int *h) gzfh = gzopen(f->filename, "rb"); if ( gzfh == NULL ) return NULL; + #ifdef HAVE_GZBUFFER /* Set larger buffer size for hopefully faster uncompression */ gzbuffer(gzfh, 128*1024); + #endif buf = malloc(bufsz); if ( buf == NULL ) return NULL; |