X-Git-Url: http://git.indexdata.com/?p=idzebra-moved-to-github.git;a=blobdiff_plain;f=index%2Frecords.c;h=797ffa5ca3a7afcc785e9f7ce5ec6c5456649c60;hp=d1f99a367bd8ed9be7aa3a9f31bc7e127729f889;hb=5a5e8d852ce98a805b02679a971cdf4216d94177;hpb=e27d8c4e191b2b2b04b2e9c4e5b5f4a9e6c49472 diff --git a/index/records.c b/index/records.c index d1f99a3..797ffa5 100644 --- a/index/records.c +++ b/index/records.c @@ -280,6 +280,28 @@ static ZEBRA_RES rec_write_tmp_buf(Records p, int size, zint *sysnos) return ZEBRA_OK; } +int rec_check_compression_method(int compression_method) +{ + switch(compression_method) + { + case REC_COMPRESS_ZLIB: +#if HAVE_ZLIB_H + return 1; +#else + return 0; +#endif + case REC_COMPRESS_BZIP2: +#if HAVE_BZLIB_H + return 1; +#else + return 0; +#endif + case REC_COMPRESS_NONE: + return 1; + } + return 0; +} + Records rec_open(BFiles bfs, int rw, int compression_method) { Records p;