fix(compress): reuse Rust block-header serializer

The frame-chunk path still encoded compressed block headers directly in C even
though the equivalent single-block path had moved to the Rust serializer.
Route this remaining call site through the same ABI leaf so both paths retain
one byte-formatting implementation and identical RLE/compressed handling.

Test Plan:
- `make -B -C lib -j2 lib` -- passed
- `make -B -C tests -j2 fuzzer` -- passed
- `tests/fuzzer -s4560 -t47 -i48 -v` -- passed
- `git diff --cached --check` -- passed
This commit is contained in:
2026-07-18 09:57:54 +02:00
parent 4663a3372e
commit c9490ffbcd
+1 -4
View File
@@ -3181,10 +3181,7 @@ static size_t ZSTD_compress_frameChunk(ZSTD_CCtx* cctx,
cSize = ZSTD_rust_noCompressBlock(op, dstCapacity, ip, blockSize, lastBlock);
FORWARD_IF_ERROR(cSize, "ZSTD_noCompressBlock failed");
} else {
U32 const cBlockHeader = cSize == 1 ?
lastBlock + (((U32)bt_rle)<<1) + (U32)(blockSize << 3) :
lastBlock + (((U32)bt_compressed)<<1) + (U32)(cSize << 3);
MEM_writeLE24(op, cBlockHeader);
ZSTD_rust_writeBlockHeader(op, cSize, blockSize, lastBlock);
cSize += ZSTD_blockHeaderSize;
}
} /* if (ZSTD_useTargetCBlockSize(&cctx->appliedParams))*/