} else if (size < 0) {
log.warn("Blob has negative size. Potential loss of data. "
+ "id={} idx={}", state.getId(), String.valueOf(i));
out.writeInt(0);
values[i] = InternalValue.create(new byte[0]);
val.discard();
} else if (size > binding.getMinBlobSize()) {
// special handling required for binary value:
// spool binary value to file in blob store
out.writeInt(BundleBinding.BINARY_IN_BLOB_STORE);
String blobId = state.getBlobId(i);