Getting ready

The code is very straightforward. There is not much you will need to get ready beforehand. Just make sure that you include the following using statements in your project and that you have a file containing text called file 3.txt at the following path C:\temp\Documents\file 3.txt. You can continue using the console application created in the preceding recipe.

using System.IO.Compression;using System.Text;using static System.Console;

Get C# 7 and .NET Core Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.