If buffer is a zip container, unwrap it and return the bytes of the
single .ifc/.ifcxml entry inside. Returns buffer UNCHANGED when it's
not a zip (cheap magic-byte check, no-op for every ordinary IFC/IFCX/GLB
file) — so callers can call this unconditionally on every load.
Throws if the archive contains zero or more than one candidate model
entry — silently picking one would risk loading the wrong model — or if
the entry's declared uncompressed size exceeds a sane ceiling (zip-bomb
guard, checked from the central-directory metadata, before decompressing).
Referenced resources (textures, documents) inside the container are not
extracted; only the model entry's bytes are returned.
If
bufferis a zip container, unwrap it and return the bytes of the single.ifc/.ifcxmlentry inside. ReturnsbufferUNCHANGED when it's not a zip (cheap magic-byte check, no-op for every ordinary IFC/IFCX/GLB file) — so callers can call this unconditionally on every load.Throws if the archive contains zero or more than one candidate model entry — silently picking one would risk loading the wrong model — or if the entry's declared uncompressed size exceeds a sane ceiling (zip-bomb guard, checked from the central-directory metadata, before decompressing). Referenced resources (textures, documents) inside the container are not extracted; only the model entry's bytes are returned.