Jason McNew cf22d78101
Avoid copying uncompressed file data to large byte[] arrays (#1954)
* Avoid copying uncompressed bundle files to large byte[].

* Move dependency check logic to SmartStream, and copy if not compatible.

Style cleanups per feedback.

* Tie the original FileStream lifecycle to any surviving partials.

* Ensure FileStream isn't finalized while we're calling Dispose() on it.

* Hold a ref to FIleStream and let the finalizer close it.

Co-authored-by: Jeremy Pritts <49847914+ds5678@users.noreply.github.com>

* Cache FileStream.SafeFileHandle getter to avoid unnecessary Seek().

See OSFileStreamStrategy.cs.

---------

Co-authored-by: Jeremy Pritts <49847914+ds5678@users.noreply.github.com>
2025-10-05 03:49:57 -07:00
..