deniszykov.BaseN 3.1.0

.NET Core 2.1 .NET Standard 1.6 .NET Framework 4.5
There is a newer version of this package available.
See the version list below for details.
dotnet add package deniszykov.BaseN --version 3.1.0
NuGet\Install-Package deniszykov.BaseN -Version 3.1.0
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="deniszykov.BaseN" Version="3.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add deniszykov.BaseN --version 3.1.0
#r "nuget: deniszykov.BaseN, 3.1.0"
#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 deniszykov.BaseN as a Cake Addin
#addin nuget:?package=deniszykov.BaseN&version=3.1.0

// Install deniszykov.BaseN as a Cake Tool
#tool nuget:?package=deniszykov.BaseN&version=3.1.0



This is BaseN encoding library. It provides simple API for converting between binary and BaseN encoded text data.
Also there is an implementation of System.Text.Encoding which provides complex streaming API with it's Convert methods.

(Un)desired feature of this library, any invalid symbols (e.g. line breaks) during decoding are ignored.

Supported encoding alphabets are Base16 aka Hex, Base32, ZBase32, Base64, Base64 Url-safe.


Install-Package deniszykov.BaseN


Utility classes
Base64Convert.ToBytes(string); // (+ 6 overloads)

// also
// Base64UrlConvert
// Base32Convert
// ZBase32Convert
// HexConvert 


using deniszykov.BaseN;

var bytes = Base64Convert.ToBytes("eg==");
// bytes[0] -> 122

Using BaseNEncoding class

using deniszykov.BaseN;

var encoding = BaseNEncoding.Base64;
var input = "eg==".ToCharArray();
var output = new byte[1024];
var decoder = encoding.GetDecoder();

decoder.Convert(input, 0, input.Length, output, 0, output.Length, flush: true, out var inputUsed, out var outputUsed, out var completed);

// completed -> true
// inputUsed -> 4
// outputUsed -> 1
// output[0] -> 122

There is overload of Convert accepting pointers and Span<T>'s.

Using custom alphabet

using deniszykov.BaseN;

var binHex4Alphabet = new BaseNAlphabet("!\"#$%&'()*+,-012345689@ABCDEFGHIJKLMNPQRSTUVXYZ[`abcdefhijklmpqr".ToCharArray());
var encoding = new BaseNEncoding(binHex4Alphabet, "mac-binhex40");
Product 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. 
.NET Core netcoreapp1.0 was computed.  netcoreapp1.1 was computed.  netcoreapp2.0 was computed.  netcoreapp2.1 is compatible.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard1.6 is compatible.  netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net45 is compatible.  net451 was computed.  net452 was computed.  net46 was computed.  net461 is compatible.  net462 was computed.  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 tizen30 was computed.  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. 
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.
  • .NETCoreApp 2.1

    • No dependencies.
  • .NETFramework 4.5

    • No dependencies.
  • .NETFramework 4.6.1

    • No dependencies.
  • .NETStandard 1.6

  • .NETStandard 2.0

    • No dependencies.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on deniszykov.BaseN:

Package Downloads

Pluto is an application server


Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
3.1.2 693 2/26/2021
3.1.1 266 1/30/2021
3.1.0 252 1/30/2021
3.0.0 246 1/29/2021