NCode.Base64Url 1.1.2

The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org. Prefix Reserved
dotnet add package NCode.Base64Url --version 1.1.2
NuGet\Install-Package NCode.Base64Url -Version 1.1.2
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="NCode.Base64Url" Version="1.1.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add NCode.Base64Url --version 1.1.2
#r "nuget: NCode.Base64Url, 1.1.2"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install NCode.Base64Url as a Cake Addin
#addin nuget:?package=NCode.Base64Url&version=1.1.2

// Install NCode.Base64Url as a Cake Tool
#tool nuget:?package=NCode.Base64Url&version=1.1.2

ci

Overview

This library provides methods for encoding and decoding base64url (RFC 4648) data using the new memory efficient Span and Buffer APIs.

namespace NCode.Encoders;

public static class Base64Url
{
    // Encode...

    public static int GetCharCountForEncode(
        int byteCount);

    public static string Encode(
        ReadOnlySpan<byte> bytes);

    public static int Encode(
        ReadOnlySpan<byte> bytes,
        IBufferWriter<char> writer);

    public static int Encode(
        ReadOnlySequence<byte> sequence,
        IBufferWriter<char> writer);

    public static bool TryEncode(
        ReadOnlySequence<byte> sequence,
        Span<char> chars,
        out int charsWritten);

    public static bool TryEncode(
        ReadOnlySpan<byte> bytes,
        Span<char> chars,
        out int charsWritten);

    // Decode...

    public static int GetByteCountForDecode(
        int charCount);

    public static byte[] Decode(
        ReadOnlySpan<char> chars);

    public static int Decode(
        ReadOnlySpan<char> chars,
        IBufferWriter<byte> writer);

    public static int Decode(
        ReadOnlySequence<char> sequence,
        IBufferWriter<byte> writer);

    public static bool TryDecode(
        ReadOnlySequence<char> sequence,
        Span<byte> bytes,
        out int bytesWritten);

    public static bool TryDecode(
        ReadOnlySpan<char> chars,
        Span<byte> bytes,
        out int bytesWritten);
}

Release Notes

  • v1.0.0 - Initial release
  • v1.1.0 - Added support for sequences
  • v1.1.1 - Added support for sequences without buffer writer
  • v1.1.2 - Added optimization for single segment sequences
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  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 was computed.  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. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.2 180 7/30/2023
1.1.1 131 7/28/2023
1.1.0 130 7/28/2023
1.0.0 141 7/16/2023
0.0.4 137 7/16/2023
0.0.3 134 7/16/2023
0.0.2 133 7/15/2023

Built on 2023-07-30 20:18:08Z