int LOG_LZ4_compress_fast_extState()

in Sources/aliyun-log-c-sdk/log_lz4.c [657:676]


int LOG_LZ4_compress_fast_extState(void* state, const char* source, char* dest, int inputSize, int maxOutputSize, int acceleration)
{
    LOG_LZ4_resetStream((LOG_LZ4_stream_t*)state);
    if (acceleration < 1) acceleration = LOG_ACCELERATION_DEFAULT;

    if (maxOutputSize >= LOG_LZ4_compressBound(inputSize))
    {
        if (inputSize < LZ4_64Klimit)
            return LZ4_compress_generic(state, source, dest, inputSize, 0, notLimited, byU16,                        noDict, noDictIssue, acceleration);
        else
            return LZ4_compress_generic(state, source, dest, inputSize, 0, notLimited, LZ4_64bits() ? byU32 : byPtr, noDict, noDictIssue, acceleration);
    }
    else
    {
        if (inputSize < LZ4_64Klimit)
            return LZ4_compress_generic(state, source, dest, inputSize, maxOutputSize, limitedOutput, byU16,                        noDict, noDictIssue, acceleration);
        else
            return LZ4_compress_generic(state, source, dest, inputSize, maxOutputSize, limitedOutput, LZ4_64bits() ? byU32 : byPtr, noDict, noDictIssue, acceleration);
    }
}