static void CompressText(string text, string destinationFile, Lz4CompressionLevel level)
 {
   using (var writer = new FileStream(destinationFile, FileMode.Create))
   using (var lz4Stream = new LZ4Stream(writer, CompressionMode.Compress, Lz4CompressionLevel.Fastest))
   {
     var lineBytes = Encoding.ASCII.GetBytes(text);
     lz4Stream.Write(lineBytes, 0, lineBytes.Length);
   }
 }
 static void CompressFile(string sourceFile, string destinationFile, Lz4CompressionLevel level)
 {
   using (var writer = new FileStream(destinationFile, FileMode.Create))
   using (var sourceStream = new FileStream(sourceFile, FileMode.Open, FileAccess.Read, FileShare.Read))
   using (var reader = new StreamReader(sourceStream))
   using (var lz4Stream = new LZ4Stream(writer, CompressionMode.Compress, Lz4CompressionLevel.Fastest))
   {
     var allContent = reader.ReadToEnd();
     var allContentBytes = Encoding.ASCII.GetBytes(allContent);
     lz4Stream.Write(allContentBytes, 0, allContentBytes.Length);
   }
 }