zstd
bool gzip, list, netdump, zstd, insert, rflag;
gzip = list = netdump = zstd = insert = rflag = false;
zstd = true;
if (gzip && zstd)
if (!netdump && !gzip && !zstd && !rflag)
if (zstd)
if (error == EINVAL && (gzip || zstd)) {
case zstd:
return (zstd);
struct tarfs_zstd *zstd; /* decompression state (zstd) */
struct tarfs_zstd *zstd = zio->zstd;
ZSTD_DCtx_reset(zstd->zds, ZSTD_reset_session_only);
zerror = ZSTD_decompressStream(zstd->zds, &zob, &zib);
ZSTD_DCtx_reset(zstd->zds, ZSTD_reset_session_only);
if (zio->zstd != NULL) {
zio->zstd = malloc(sizeof(*zio->zstd), M_TARFSZSTATE, M_WAITOK);
zio->zstd->zds = ZSTD_createDStream_advanced(tarfs_zstd_mem);
(void)ZSTD_initDStream(zio->zstd->zds);
if (zio->zstd != NULL) {
ZSTD_freeDStream(zio->zstd->zds);
free(zio->zstd, M_TARFSZSTATE);