Compress an array of strings

    Parameters
    ----------
        str_list: `list[str]`
            The input list of strings which need to be compressed.
        withHC: `bool`
            This flag controls whether lz4HC will be used.

    Returns
    -------
    `list[str`
    The list of the compressed strings.

def compress_array(str_list, withHC=LZ4_HIGH_COMPRESSION):
    """
    Compress an array of strings

    Parameters
    ----------
        str_list: `list[str]`
            The input list of strings which need to be compressed.
        withHC: `bool`
            This flag controls whether lz4HC will be used.

    Returns
    -------
    `list[str`
    The list of the compressed strings.
    """
    global _compress_thread_pool

    if not str_list:
        return str_list

    do_compress = lz4_compressHC if withHC else lz4_compress

    def can_parallelize_strlist(strlist):
        return len(strlist) > LZ4_N_PARALLEL and len(strlist[0]) > LZ4_MINSZ_PARALLEL

    use_parallel = (ENABLE_PARALLEL and withHC) or can_parallelize_strlist(str_list)

    if BENCHMARK_MODE or use_parallel:
        if _compress_thread_pool is None:
            _compress_thread_pool = ThreadPool(LZ4_WORKERS)
        return _compress_thread_pool.map(do_compress, str_list)

    return [do_compress(s) for s in str_list]