contentKey: null on the wire means "the sender had not computed one", NOT
"the key is null" -- toTransferable deliberately does not force the
full-file hash. So it maps to undefined here, which is the constructor's
"not computed yet" state, and the receiver hashes lazily on its own thread if
anything asks. Passing the null straight through would pin the key at null
forever and every downstream cache would key on nothing.
A non-empty source cannot legitimately have a null key: fnv1a always
returns a string, and a zero-length view collapses to
EMPTY_SOURCE_BYTES before it can reach a constructor.
CONSTRAINT FOR THE BLOCKED IMPLEMENTATION. A contiguous receiver can shrug
off a missing key because recomputing it is one linear pass over bytes it
already holds. A blocked one cannot -- it would have to inflate every block
to hash them. So the compression swap must compute and carry contentKey
EAGERLY, at swap time, while the bytes are still contiguous. Inheriting the
lazy contiguous behaviour there would turn the first cache lookup into a
full decompression of the model.
Rebuild a source from IfcSourceBytes.toTransferable output.
contentKey: nullon the wire means "the sender had not computed one", NOT "the key is null" --toTransferabledeliberately does not force the full-file hash. So it maps toundefinedhere, which is the constructor's "not computed yet" state, and the receiver hashes lazily on its own thread if anything asks. Passing thenullstraight through would pin the key at null forever and every downstream cache would key on nothing.A non-empty source cannot legitimately have a null key:
fnv1aalways returns a string, and a zero-length view collapses to EMPTY_SOURCE_BYTES before it can reach a constructor.CONSTRAINT FOR THE BLOCKED IMPLEMENTATION. A contiguous receiver can shrug off a missing key because recomputing it is one linear pass over bytes it already holds. A blocked one cannot -- it would have to inflate every block to hash them. So the compression swap must compute and carry
contentKeyEAGERLY, at swap time, while the bytes are still contiguous. Inheriting the lazy contiguous behaviour there would turn the first cache lookup into a full decompression of the model.