Use PPMd fallback for adapt2 if BSC is not enabled.
This commit is contained in:
parent
f41ea40bb9
commit
cb853821c7
1 changed files with 4 additions and 2 deletions
|
@ -227,22 +227,24 @@ adapt_compress(void *src, uint64_t srclen, void *dst,
|
||||||
bzip2_count++;
|
bzip2_count++;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
#ifdef ENABLE_PC_LIBBSC
|
||||||
if (adat->bsc_data && tag1 > tag2 - 4 && tag1 < tag2 + 4 && tag3 > (double)tag1 * 0.40 &&
|
if (adat->bsc_data && tag1 > tag2 - 4 && tag1 < tag2 + 4 && tag3 > (double)tag1 * 0.40 &&
|
||||||
tagcnt > (double)srclen * 0.001) {
|
tagcnt > (double)srclen * 0.001) {
|
||||||
#ifdef ENABLE_PC_LIBBSC
|
|
||||||
rv = libbsc_compress(src, srclen, dst, dstlen, level, chdr, adat->bsc_data);
|
rv = libbsc_compress(src, srclen, dst, dstlen, level, chdr, adat->bsc_data);
|
||||||
if (rv < 0)
|
if (rv < 0)
|
||||||
return (rv);
|
return (rv);
|
||||||
rv = ADAPT_COMPRESS_BSC;
|
rv = ADAPT_COMPRESS_BSC;
|
||||||
bsc_count++;
|
bsc_count++;
|
||||||
#endif
|
|
||||||
} else {
|
} else {
|
||||||
|
#endif
|
||||||
rv = ppmd_compress(src, srclen, dst, dstlen, level, chdr, adat->ppmd_data);
|
rv = ppmd_compress(src, srclen, dst, dstlen, level, chdr, adat->ppmd_data);
|
||||||
if (rv < 0)
|
if (rv < 0)
|
||||||
return (rv);
|
return (rv);
|
||||||
rv = ADAPT_COMPRESS_PPMD;
|
rv = ADAPT_COMPRESS_PPMD;
|
||||||
ppmd_count++;
|
ppmd_count++;
|
||||||
|
#ifdef ENABLE_PC_LIBBSC
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
return (rv);
|
return (rv);
|
||||||
|
|
Loading…
Reference in a new issue