Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions docs/core/whats-new/dotnet-core-2-1.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
---
---
title: What's new in .NET Core 2.1
description: Learn about the new features found in .NET Core 2.1.
dev_langs:
- "csharp"
- "vb"
author: rpetrusha
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll let @rpetrusha review this but we'd need to add the following metadata to this section

dev_langs: 
  - "csharp"
  - "vb"

ms.author: ronpet
ms.date: 06/06/2018
ms.date: 10/10/2018
---
# What's new in .NET Core 2.1

Expand Down Expand Up @@ -160,10 +163,12 @@ You can opt into tiered compilation in either of two ways.

Without these types, when passing such items as a portion of an array or a section of a memory buffer, you have to make a copy of some portion of the data before passing it to a method. These types provide a virtual view of that data that eliminates the need for the additional memory allocation and copy operations.

The following example uses a <xref:System.Span%601> instance to provide a virtual view of 10 elements of an array.
The following example uses a <xref:System.Span%601> and <xref:System.Memory%601> instance to provide a virtual view of 10 elements of an array.

[!CODE-csharp[Span\<T>](~/samples/core/whats-new/whats-new-in-21/cs/program.cs)]

[!CODE-vb[Memory\<T>](~/samples/core/whats-new/whats-new-in-21/vb/program.vb)]

### Brotli compression

.NET Core 2.1 adds support for Brotli compression and decompression. Brotli is a general-purpose lossless compression algorithm that is defined in [RFC 7932](https://www.ietf.org/rfc/rfc7932.txt) and is supported by most web browsers and major web servers. You can use the stream-based <xref:System.IO.Compression.BrotliStream?displayProperty=nameWithType> class or the high-performance span-based <xref:System.IO.Compression.BrotliEncoder?displayProperty=nameWithType> and <xref:System.IO.Compression.BrotliDecoder?displayProperty=nameWithType> classes. The following example illustrates compression with the <xref:System.IO.Compression.BrotliStream> class:
Expand Down