mirror of
https://github.com/facebook/zstd.git
synced 2025-07-29 11:21:22 +03:00
AsyncIO compression part 2 - added async read and asyncio to compression code (#3022)
* Compression asyncio: - Added asyncio functionality for compression flow - Added ReadPool for async reads, implemented in both comp and decomp flows
This commit is contained in:
@ -46,6 +46,7 @@
|
||||
# include "zstdcli_trace.h"
|
||||
#endif
|
||||
#include "../lib/zstd.h" /* ZSTD_VERSION_STRING, ZSTD_minCLevel, ZSTD_maxCLevel */
|
||||
#include "fileio_asyncio.h"
|
||||
|
||||
|
||||
/*-************************************
|
||||
@ -179,7 +180,8 @@ static void usage_advanced(const char* programName)
|
||||
#ifdef UTIL_HAS_MIRRORFILELIST
|
||||
DISPLAYOUT( "--output-dir-mirror DIR : processed files are stored into DIR respecting original directory structure \n");
|
||||
#endif
|
||||
|
||||
if (AIO_supported())
|
||||
DISPLAYOUT( "--[no-]asyncio : use asynchronous IO (default: enabled) \n");
|
||||
|
||||
#ifndef ZSTD_NOCOMPRESS
|
||||
DISPLAYOUT( "--[no-]check : during compression, add XXH64 integrity checksum to frame (default: enabled)");
|
||||
@ -242,9 +244,6 @@ static void usage_advanced(const char* programName)
|
||||
DISPLAYOUT( " -l : print information about zstd compressed files \n");
|
||||
DISPLAYOUT( "--test : test compressed file integrity \n");
|
||||
DISPLAYOUT( " -M# : Set a memory usage limit for decompression \n");
|
||||
#ifdef ZSTD_MULTITHREAD
|
||||
DISPLAYOUT( "--[no-]asyncio : use threaded asynchronous IO for output (default: disabled) \n");
|
||||
#endif
|
||||
# if ZSTD_SPARSE_DEFAULT
|
||||
DISPLAYOUT( "--[no-]sparse : sparse mode (default: enabled on file, disabled on stdout) \n");
|
||||
# else
|
||||
@ -1459,6 +1458,7 @@ int main(int argCount, const char* argv[])
|
||||
FIO_setTargetCBlockSize(prefs, targetCBlockSize);
|
||||
FIO_setSrcSizeHint(prefs, srcSizeHint);
|
||||
FIO_setLiteralCompressionMode(prefs, literalCompressionMode);
|
||||
FIO_setSparseWrite(prefs, 0);
|
||||
if (adaptMin > cLevel) cLevel = adaptMin;
|
||||
if (adaptMax < cLevel) cLevel = adaptMax;
|
||||
|
||||
|
Reference in New Issue
Block a user