Microsoft.Bcl.Memory
10.0.0-preview.6.25358.103
Prefix Reserved
See the version list below for details.
dotnet add package Microsoft.Bcl.Memory --version 10.0.0-preview.6.25358.103
NuGet\Install-Package Microsoft.Bcl.Memory -Version 10.0.0-preview.6.25358.103
<PackageReference Include="Microsoft.Bcl.Memory" Version="10.0.0-preview.6.25358.103" />
<PackageVersion Include="Microsoft.Bcl.Memory" Version="10.0.0-preview.6.25358.103" />
<PackageReference Include="Microsoft.Bcl.Memory" />
paket add Microsoft.Bcl.Memory --version 10.0.0-preview.6.25358.103
#r "nuget: Microsoft.Bcl.Memory, 10.0.0-preview.6.25358.103"
#:package Microsoft.Bcl.Memory@10.0.0-preview.6.25358.103
#addin nuget:?package=Microsoft.Bcl.Memory&version=10.0.0-preview.6.25358.103&prerelease
#tool nuget:?package=Microsoft.Bcl.Memory&version=10.0.0-preview.6.25358.103&prerelease
About
Provides Index
and Range
types to simplify slicing operations on collections for .NET Framework and .NET Standard 2.0.
Provides Base64Url
for encoding data in a URL-safe manner on older .NET platforms.
Provides Utf8
for converting chunked data between UTF-8 and UTF-16 encodings on .NET Framework and .NET Standard 2.0.
This library is not necessary nor recommended when targeting versions of .NET that include the relevant support.
Key Features
- Enables the use of
Index
andRange
types on .NET Framework and .NET Standard 2.0. - Provides
Base64Url
encoding, decoding, and validation for URL-safe data processing on older .NET platforms. - Provides
Utf8
encoding, decoding, and validation for chunked data between UTF-8 and UTF-16 on .NET Framework and .NET Standard 2.0.
How to Use
The Index
and Range
types simplify working with slices of arrays, strings, or other collections.
string[] words = ["The", "quick", "brown", "fox", "jumps", "over", "the", "lazy", "dog"];
// Use Index to reference the last element
Console.WriteLine(words[^1]);
// Output: "dog"
// Use Range to reference a slice
string[] phrase = words[1..4];
Console.WriteLine(string.Join(" ", phrase));
// Output: "quick brown fox"
Base64Url
encoding is a URL-safe version of Base64, commonly used in web applications, such as JWT tokens.
using System.Buffers.Text;
using System.Text;
// Original data
byte[] data = Encoding.UTF8.GetBytes("Hello World!");
Span<byte> encoded = new byte[Base64Url.GetEncodedLength(data.Length)];
Base64Url.EncodeToUtf8(data, encoded, out int _, out int bytesWritten);
string encodedString = Base64Url.EncodeToString(data);
Console.WriteLine($"Encoded: {encodedString}");
// Encoded: SGVsbG8gV29ybGQh
Span<byte> decoded = new byte[data.Length];
Base64Url.DecodeFromUtf8(encoded[..bytesWritten], decoded, out _, out bytesWritten);
string decodedString = Encoding.UTF8.GetString(decoded[..bytesWritten]);
Console.WriteLine($"Decoded: {decodedString}");
// Decoded: Hello World!
Main Types
The main types provided by this library are:
System.Index
System.Range
System.Buffers.Text.Base64Url
System.Text.Unicode.Utf8
Additional Documentation
API documentation
Feedback & Contributing
Microsoft.Bcl.Memory is released as open source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
.NET Framework | net461 was computed. net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.6.2
- System.Memory (>= 4.6.3)
- System.Runtime.CompilerServices.Unsafe (>= 6.1.2)
- System.ValueTuple (>= 4.6.1)
-
.NETStandard 2.0
- System.Memory (>= 4.6.3)
- System.Runtime.CompilerServices.Unsafe (>= 6.1.2)
-
.NETStandard 2.1
- System.Runtime.CompilerServices.Unsafe (>= 6.1.2)
-
net10.0
- No dependencies.
-
net8.0
- No dependencies.
-
net9.0
- No dependencies.
GitHub repositories (21)
Showing the top 20 popular GitHub repositories that depend on Microsoft.Bcl.Memory:
Repository | Stars |
---|---|
dotnet/machinelearning
ML.NET is an open source and cross-platform machine learning framework for .NET.
|
|
Cysharp/ZLinq
Zero allocation LINQ with LINQ to Span, LINQ to SIMD, and LINQ to Tree (FileSystem, JSON, GameObject, etc.) for all .NET platforms and Unity, Godot.
|
|
dotnet/Open-XML-SDK
Open XML SDK by Microsoft
|
|
dotnet/command-line-api
Command line parsing, invocation, and rendering of terminal output.
|
|
mini-software/MiniExcel
Fast, Low-Memory, Easy Excel .NET helper to import/export/template spreadsheet (support Linux, Mac)
|
|
modelcontextprotocol/csharp-sdk
The official C# SDK for Model Context Protocol servers and clients. Maintained in collaboration with Microsoft.
|
|
netwrix/pingcastle
PingCastle - Get Active Directory Security at 80% in 20% of the time
|
|
passwordless-lib/fido2-net-lib
FIDO2 .NET library for FIDO2 / WebAuthn Attestation and Assertion using .NET
|
|
dnnsoftware/Dnn.Platform
DNN (formerly DotNetNuke) is the leading open source web content management platform (CMS) in the Microsoft ecosystem.
|
|
visualHFT/VisualHFT
VisualHFT is a WPF/C# desktop GUI that shows market microstructure in real time. You can track advanced limit‑order‑book dynamics and execution quality, then use its modular plugins to shape the analysis to your workflow.
|
|
Azure/azure-functions-dotnet-worker
Azure Functions out-of-process .NET language worker
|
|
SimonCropp/Polyfill
Source only package that exposes newer APIs, .net features, and C# features to older runtimes.
|
|
axzxs2001/Asp.NetCoreExperiment
原来所有项目都移动到**OleVersion**目录下进行保留。新的案例装以.net 5.0为主,一部分对以前案例进行升级,一部分将以前的工作经验总结出来,以供大家参考!
|
|
Syslifters/offsec-tools
Compiled tools for internal assessments
|
|
martinjw/dbschemareader
Read database metadata (from SqlServer/Oracle/MySql/SQLite/PostgreSql/DB2 etc) into one simple model
|
|
teknogods/TeknoParrotUI
Open Source JVS / Arcade Emulator for Windows
|
|
PederHP/mcpdotnet
.NET implementation of the Model Context Protocol (MCP)
|
|
h4wkst3r/ADOKit
Azure DevOps Services Attack Toolkit
|
|
notargs/UnityNaturalMCP
UnityNaturalMCP is an MCP server implementation for Unity that aims for a "natural" user experience.
|
|
discord-csharp/MODiX
Discord Bot handling basic moderation needs, soon implements statistics.
|
Version | Downloads | Last Updated |
---|---|---|
10.0.0-preview.7.25380.108 | 0 | 8/11/2025 |
10.0.0-preview.7.25380.105 | 0 | 8/6/2025 |
10.0.0-preview.6.25358.103 | 0 | 7/17/2025 |
10.0.0-preview.6.25321.102 | 0 | 6/25/2025 |
10.0.0-preview.5.25280.105 | 0 | 6/2/2025 |
10.0.0-preview.5.25277.114 | 0 | 6/3/2025 |
10.0.0-preview.5.25277.101 | 0 | 5/29/2025 |
10.0.0-preview.4.25255.103 | 0 | 5/12/2025 |
9.0.7 | 0 | 7/11/2025 |