X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=index%2Frecords.c;h=f6ef93d0e7301709250532f4f587c27b5464263c;hb=c00021ca63c39b965a6c02c51f56d359b9cba4b3;hp=d1f99a367bd8ed9be7aa3a9f31bc7e127729f889;hpb=877066bb282e1ee809ef2caf2ff5351bf6424c45;p=idzebra-moved-to-github.git diff --git a/index/records.c b/index/records.c index d1f99a3..f6ef93d 100644 --- a/index/records.c +++ b/index/records.c @@ -1,5 +1,5 @@ /* This file is part of the Zebra server. - Copyright (C) 1994-2009 Index Data + Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free @@ -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;