aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/quicklz/quicklz.cpp
blob: 044ce45d548057873ec5bd9046719783b1ac0280 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include "quicklz.h"

extern "C" struct TQuickLZMethods* GetLzq151Table(unsigned level, unsigned buf);

const TQuickLZMethods* LzqTable(unsigned ver, unsigned level, unsigned buf) {
    if (ver > 2 || level > 3 || buf > 2) {
        return 0;
    }

    if (ver == 2) {
        if (!level) {
            return 0;
        }

        return GetLzq151Table(level - 1, buf);
    }

    return GetLzqTable(ver, level, buf);
}