Blog
Mert Özen's blog posts on software development, backend, frontend, and DevOps.
I/O and Serialization in .NET 11: Union Serialization, JSON Lines, In-Memory Streams and Zstandard
In .NET 11, System.Text.Json serializes C# 15 unions without a wrapper and writes JSON Lines with SerializeAsyncEnumerable; System.IO.Compression gained Zstandard, and ZIP gained passwords and CRC32 validation. We show the new in-memory streams, closed hierarchy polymorphism and two behavior changes that can break old tests (an empty GZip is now 20 bytes, a corrupted zip entry now throws), compared with .NET 10.
Compression and Archives: GZip, Brotli, ZipArchive's Async APIs and Zip Slip
Sending a large zip to a user needs no file or MemoryStream: ZipArchive's Create mode writes entries straight to the response body, but because .NET 10's async ZIP APIs still write the end of each entry synchronously, Kestrel needs an explicit allowance. We measure GZip, ZLib, Deflate and Brotli at each level, compare zip with tar.gz and safely extract an uploaded zip against Zip Slip and zip bombs.