This repository has been archived by the owner on Aug 2, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 344
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Documentation naming fixes, spelling fixes, line length standardizati…
…on. (#1836) * Documentation naming fixes, spelling fixes, line length standardization. * Fixed workitems copy issue
- Loading branch information
1 parent
4446c23
commit ca88785
Showing
9 changed files
with
375 additions
and
222 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,24 @@ | ||
# Encoding | ||
|
||
The existing .NET encoding APIs (System.Text.Encoding) don't work super well in non-allocating data pipelines: | ||
The existing .NET encoding APIs (System.Text.Encoding) don't work super well in | ||
non-allocating data pipelines: | ||
|
||
1. They allocate output arrays (as opposed to taking output buffers are parameters). | ||
1. They allocate output arrays (as opposed to taking output buffers are | ||
parameters). | ||
2. They don't work with Span\<T\> | ||
3. They have the overhead of virtual calls (which might be significant to transcoding small slices) | ||
3. They have the overhead of virtual calls (which might be significant to | ||
transcoding small slices) | ||
|
||
The requirements for the new APIs are as follows: | ||
|
||
1. Transcode bytes contained in ReadOnlySpan<byte> into a passed in Span<byte> | ||
2. The API needs to handle running out of space in the output buffer and then continuing when an additional output buffer is passed in. | ||
2. The API needs to handle running out of space in the output buffer and then | ||
continuing when an additional output buffer is passed in. | ||
3. The API needs to be fast (on par with native code implementations) | ||
4. Needs to do this with zero GC allocations | ||
5. Needs to be stateless (multithreaded) | ||
6. We need to support transcoding between UTF8, UTF16LE, ISO8859-1, and be able to support other encodings in the future. | ||
6. We need to support transcoding between UTF8, UTF16LE, ISO8859-1, and be able | ||
to support other encodings in the future. | ||
|
||
This document will describe these issues in detail and propose new APIs better suited for data pipelines. | ||
This document will describe these issues in detail and propose new APIs better | ||
suited for data pipelines. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.