@@ -2,7 +2,10 @@ name: windows-artifacts
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ release, test_artifacts, win_artifacts ]
|
branches: [ test_artifacts, win_artifacts ]
|
||||||
|
release:
|
||||||
|
types:
|
||||||
|
- published
|
||||||
|
|
||||||
permissions: read-all
|
permissions: read-all
|
||||||
|
|
||||||
@@ -37,12 +40,12 @@ jobs:
|
|||||||
- name: Create artifacts
|
- name: Create artifacts
|
||||||
run: |
|
run: |
|
||||||
./lib/dll/example/build_package.bat
|
./lib/dll/example/build_package.bat
|
||||||
cd bin/
|
mv bin/ zstd-${{ github.ref_name }}-win64/
|
||||||
7z a -tzip -mx9 zstd-win-release-win64.zip *
|
7z a -tzip -mx9 zstd-${{ github.ref_name }}-win64.zip zstd-${{ github.ref_name }}-win64/
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
- name: Publish zstd-win-release-win64.zip
|
- name: Publish zstd-$VERSION-win64.zip
|
||||||
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # tag=v3
|
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # tag=v3
|
||||||
with:
|
with:
|
||||||
path: ${{ github.workspace }}/bin/zstd-win-release-win64.zip
|
path: ${{ github.workspace }}/zstd-${{ github.ref_name }}-win64.zip
|
||||||
name: zstd-win-release-win64.zip
|
name: zstd-${{ github.ref_name }}-win64.zip
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ cli: mmap large dictionaries to save memory, by @daniellerozenblit
|
|||||||
cli: improve speed of --patch-from mode (~+50%) (#3545) by @daniellerozenblit
|
cli: improve speed of --patch-from mode (~+50%) (#3545) by @daniellerozenblit
|
||||||
cli: improve i/o speed (~+10%) when processing lots of small files (#3479) by @felixhandte
|
cli: improve i/o speed (~+10%) when processing lots of small files (#3479) by @felixhandte
|
||||||
cli: zstd no longer crashes when requested to write into write-protected directory (#3541) by @felixhandte
|
cli: zstd no longer crashes when requested to write into write-protected directory (#3541) by @felixhandte
|
||||||
cli: fix decompression into block device using -o (#3584, @Cyan4973) reported by @georgmu
|
cli: fix decompression into block device using -o, reported by @georgmu (#3583)
|
||||||
build: fix zstd CLI compiled with lzma support but not zlib support (#3494) by @Hello71
|
build: fix zstd CLI compiled with lzma support but not zlib support (#3494) by @Hello71
|
||||||
build: fix cmake does no longer require 3.18 as minimum version (#3510) by @kou
|
build: fix cmake does no longer require 3.18 as minimum version (#3510) by @kou
|
||||||
build: fix MSVC+ClangCL linking issue (#3569) by @tru
|
build: fix MSVC+ClangCL linking issue (#3569) by @tru
|
||||||
|
|||||||
@@ -1232,9 +1232,9 @@ static void ZSTD_dedicatedDictSearch_revertCParams(
|
|||||||
ZSTD_compressionParameters* cParams);
|
ZSTD_compressionParameters* cParams);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initializes the local dict using the requested parameters.
|
* Initializes the local dictionary using requested parameters.
|
||||||
* NOTE: This does not use the pledged src size, because it may be used for more
|
* NOTE: Initialization does not employ the pledged src size,
|
||||||
* than one compression.
|
* because the dictionary may be used for multiple compressions.
|
||||||
*/
|
*/
|
||||||
static size_t ZSTD_initLocalDict(ZSTD_CCtx* cctx)
|
static size_t ZSTD_initLocalDict(ZSTD_CCtx* cctx)
|
||||||
{
|
{
|
||||||
@@ -1247,8 +1247,8 @@ static size_t ZSTD_initLocalDict(ZSTD_CCtx* cctx)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (dl->cdict != NULL) {
|
if (dl->cdict != NULL) {
|
||||||
assert(cctx->cdict == dl->cdict);
|
|
||||||
/* Local dictionary already initialized. */
|
/* Local dictionary already initialized. */
|
||||||
|
assert(cctx->cdict == dl->cdict);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
assert(dl->dictSize > 0);
|
assert(dl->dictSize > 0);
|
||||||
@@ -1268,26 +1268,30 @@ static size_t ZSTD_initLocalDict(ZSTD_CCtx* cctx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
size_t ZSTD_CCtx_loadDictionary_advanced(
|
size_t ZSTD_CCtx_loadDictionary_advanced(
|
||||||
ZSTD_CCtx* cctx, const void* dict, size_t dictSize,
|
ZSTD_CCtx* cctx,
|
||||||
ZSTD_dictLoadMethod_e dictLoadMethod, ZSTD_dictContentType_e dictContentType)
|
const void* dict, size_t dictSize,
|
||||||
|
ZSTD_dictLoadMethod_e dictLoadMethod,
|
||||||
|
ZSTD_dictContentType_e dictContentType)
|
||||||
{
|
{
|
||||||
RETURN_ERROR_IF(cctx->streamStage != zcss_init, stage_wrong,
|
|
||||||
"Can't load a dictionary when ctx is not in init stage.");
|
|
||||||
DEBUGLOG(4, "ZSTD_CCtx_loadDictionary_advanced (size: %u)", (U32)dictSize);
|
DEBUGLOG(4, "ZSTD_CCtx_loadDictionary_advanced (size: %u)", (U32)dictSize);
|
||||||
ZSTD_clearAllDicts(cctx); /* in case one already exists */
|
RETURN_ERROR_IF(cctx->streamStage != zcss_init, stage_wrong,
|
||||||
if (dict == NULL || dictSize == 0) /* no dictionary mode */
|
"Can't load a dictionary when cctx is not in init stage.");
|
||||||
|
ZSTD_clearAllDicts(cctx); /* erase any previously set dictionary */
|
||||||
|
if (dict == NULL || dictSize == 0) /* no dictionary */
|
||||||
return 0;
|
return 0;
|
||||||
if (dictLoadMethod == ZSTD_dlm_byRef) {
|
if (dictLoadMethod == ZSTD_dlm_byRef) {
|
||||||
cctx->localDict.dict = dict;
|
cctx->localDict.dict = dict;
|
||||||
} else {
|
} else {
|
||||||
|
/* copy dictionary content inside CCtx to own its lifetime */
|
||||||
void* dictBuffer;
|
void* dictBuffer;
|
||||||
RETURN_ERROR_IF(cctx->staticSize, memory_allocation,
|
RETURN_ERROR_IF(cctx->staticSize, memory_allocation,
|
||||||
"no malloc for static CCtx");
|
"static CCtx can't allocate for an internal copy of dictionary");
|
||||||
dictBuffer = ZSTD_customMalloc(dictSize, cctx->customMem);
|
dictBuffer = ZSTD_customMalloc(dictSize, cctx->customMem);
|
||||||
RETURN_ERROR_IF(!dictBuffer, memory_allocation, "NULL pointer!");
|
RETURN_ERROR_IF(dictBuffer==NULL, memory_allocation,
|
||||||
|
"allocation failed for dictionary content");
|
||||||
ZSTD_memcpy(dictBuffer, dict, dictSize);
|
ZSTD_memcpy(dictBuffer, dict, dictSize);
|
||||||
cctx->localDict.dictBuffer = dictBuffer;
|
cctx->localDict.dictBuffer = dictBuffer; /* owned ptr to free */
|
||||||
cctx->localDict.dict = dictBuffer;
|
cctx->localDict.dict = dictBuffer; /* read-only reference */
|
||||||
}
|
}
|
||||||
cctx->localDict.dictSize = dictSize;
|
cctx->localDict.dictSize = dictSize;
|
||||||
cctx->localDict.dictContentType = dictContentType;
|
cctx->localDict.dictContentType = dictContentType;
|
||||||
@@ -1357,7 +1361,7 @@ size_t ZSTD_CCtx_reset(ZSTD_CCtx* cctx, ZSTD_ResetDirective reset)
|
|||||||
if ( (reset == ZSTD_reset_parameters)
|
if ( (reset == ZSTD_reset_parameters)
|
||||||
|| (reset == ZSTD_reset_session_and_parameters) ) {
|
|| (reset == ZSTD_reset_session_and_parameters) ) {
|
||||||
RETURN_ERROR_IF(cctx->streamStage != zcss_init, stage_wrong,
|
RETURN_ERROR_IF(cctx->streamStage != zcss_init, stage_wrong,
|
||||||
"Can't reset parameters only when not in init stage.");
|
"Reset parameters is only possible during init stage.");
|
||||||
ZSTD_clearAllDicts(cctx);
|
ZSTD_clearAllDicts(cctx);
|
||||||
ZSTD_memset(&cctx->externalMatchCtx, 0, sizeof(cctx->externalMatchCtx));
|
ZSTD_memset(&cctx->externalMatchCtx, 0, sizeof(cctx->externalMatchCtx));
|
||||||
return ZSTD_CCtxParams_reset(&cctx->requestedParams);
|
return ZSTD_CCtxParams_reset(&cctx->requestedParams);
|
||||||
|
|||||||
+1
-1
@@ -604,11 +604,11 @@ FIO_openDstFile(FIO_ctx_t* fCtx, FIO_prefs_t* const prefs,
|
|||||||
|
|
||||||
isDstRegFile = UTIL_isRegularFile(dstFileName); /* invoke once */
|
isDstRegFile = UTIL_isRegularFile(dstFileName); /* invoke once */
|
||||||
if (prefs->sparseFileSupport == 1) {
|
if (prefs->sparseFileSupport == 1) {
|
||||||
|
prefs->sparseFileSupport = ZSTD_SPARSE_DEFAULT;
|
||||||
if (!isDstRegFile) {
|
if (!isDstRegFile) {
|
||||||
prefs->sparseFileSupport = 0;
|
prefs->sparseFileSupport = 0;
|
||||||
DISPLAYLEVEL(4, "Sparse File Support is disabled when output is not a file \n");
|
DISPLAYLEVEL(4, "Sparse File Support is disabled when output is not a file \n");
|
||||||
}
|
}
|
||||||
prefs->sparseFileSupport = ZSTD_SPARSE_DEFAULT;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isDstRegFile) {
|
if (isDstRegFile) {
|
||||||
|
|||||||
Reference in New Issue
Block a user