mysink->cctx = ZSTD_createCCtx(); if (!mysink->cctx)
elog(ERROR, "could not create zstd compression context");
ret = ZSTD_CCtx_setParameter(mysink->cctx, ZSTD_c_compressionLevel,
compress->level); if (ZSTD_isError(ret))
elog(ERROR, "could not set zstd compression level to %d: %s",
compress->level, ZSTD_getErrorName(ret));
if ((compress->options & PG_COMPRESSION_OPTION_WORKERS) != 0)
{ /* *Onolderversionsoflibzstd,thisoptiondoesnotexist,and *tryingtosetitwillfail.Similarlyfornewerversionsifthey *arecompiledwithoutthreadingsupport.
*/
ret = ZSTD_CCtx_setParameter(mysink->cctx, ZSTD_c_nbWorkers,
compress->workers); if (ZSTD_isError(ret))
ereport(ERROR,
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("could not set compression worker count to %d: %s",
compress->workers, ZSTD_getErrorName(ret)));
}
if ((compress->options & PG_COMPRESSION_OPTION_LONG_DISTANCE) != 0)
{
ret = ZSTD_CCtx_setParameter(mysink->cctx,
ZSTD_c_enableLongDistanceMatching,
compress->long_distance); if (ZSTD_isError(ret))
ereport(ERROR,
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("could not enable long-distance mode: %s",
ZSTD_getErrorName(ret)));
}
if (ZSTD_isError(yet_to_flush))
elog(ERROR, "could not compress data: %s",
ZSTD_getErrorName(yet_to_flush));
} while (yet_to_flush > 0);
/* Make sure to pass any remaining bytes to the next sink. */ if (mysink->zstd_outBuf.pos > 0)
bbsink_archive_contents(mysink->base.bbs_next,
mysink->zstd_outBuf.pos);
/* Pass on the information that this archive has ended. */
bbsink_forward_end_archive(sink);
}
/* Release the context if not already released. */ if (mysink->cctx)
{
ZSTD_freeCCtx(mysink->cctx);
mysink->cctx = NULL;
}
}
#endif
Messung V0.5 in Prozent
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.12Bemerkung:
(Wie Sie bei der Firma Beratungs- und Dienstleistungen beauftragen können 2026-09-28)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.