mirror of
https://github.com/BepInEx/dotnet-runtime.git
synced 2026-11-22 19:10:41 -10:00
1) Internal buffer overflows, but write can fit in next buffer - Fill the existing buffer, copy the remaining data into a new buffer, and flush the original to disk 2) Internal buffer is non-empty, overflows, and the remaining data won't fit in a second buffer - Chain the flush operation to a second write operation which writes the entire incoming block directly to disk. Additionally, adds a new unit test to ensure the different buffering cases are being covered. Commit migrated from https://github.com/dotnet/corefx/commit/b69caa929d3cb3b87574ee31a651d799f61e3a75