Base4K 1.0.4

dotnet add package Base4K --version 1.0.4
                    
NuGet\Install-Package Base4K -Version 1.0.4
                    
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="Base4K" Version="1.0.4" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Base4K" Version="1.0.4" />
                    
Directory.Packages.props
<PackageReference Include="Base4K" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Base4K --version 1.0.4
                    
#r "nuget: Base4K, 1.0.4"
                    
#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.
#:package Base4K@1.0.4
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Base4K&version=1.0.4
                    
Install as a Cake Addin
#tool nuget:?package=Base4K&version=1.0.4
                    
Install as a Cake Tool

UTF16 Base4K(alphabetical) encoding for NET Core

Nuget

Summary

The Base4K encoding scheme represents binary data as text using a set of 4096 characters (letters) of the virtual alphabet. In this encoding, the data-to-character ratio of 3 bytes roughly corresponds to two Unicode characters of text. The library implements two data storage in memory formats - in the form of a unary block and in the form of a chain, so far only a scalar algorithm. This encoding is focused on the compact representation of binary data, hashes and cryptographic keys on a web page or embed into a text document.

Base4K схема кодирования представляет двоичные данные как текст с использованием набора 4096 символов (букв) виртуального алфавита. В этой кодировке соотношение данных к символам - 3 байта примерно соответствуют двум Unicode символам текста. В библиотеке реализовано два формата хранения данных в памяти - в виде блока и в виде цепочки, пока еще только скалярный алгоритм. Кодировка предназначена для компактного представления двоичных данных, хэшей и ключей на веб-странице или в текстовом редакторе.

Encoding examples

Primitive Bits Encoded length Example
Guid 128 11 ຯˤYᵞὡὃಳଏΰഽɁ
SHA256 256 22 ǨᇥĪⱿⴊᑲƊԧᵼћᛀላcᶽড়ϐᦶቿKᦱIӌ
SHA512 512 43 ΊᄮୠඊⳄḚȎԩƯড়ՏፅᴨᴃфণᕢᲚᴘᶳᑑӈṲⳏƫჃᵇᴩཝʇIᓠǾམนᲧӏចḯᧁឥᴗt

Online Demo

Scheme

[  byte 2 ][  byte 1 ][ byte 0 ]
[     8   ][ 4 ][  4 ][   8    ]
[virtual code 1][virtual code 0]
[  16 <#< 12   ][  16 <#< 12   ]
[unicode char 1][unicode char 0]

Library

Namespace: Lex4K
Static class: Base4K

IsBase4KChar()
EncodeBlock() - 2 overloads
EncodeBlockToString()
EncodeBlockToStringBuilder()
EncodeChain() - 2 overloads
EncodeChainToString()
EncodeChainToStringBuilder()
DecodeBlock()
DecodeBlockToNewBuffer()
DecodeChain()
DecodeChainToNewBuffer()

Apache 2.0 license 2022 © vadim b. (vadim baklanov)

Product Compatible and additional computed target framework versions.
.NET 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.  net9.0 was computed.  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 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net6.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on Base4K:

Repository Stars
securefolderfs-community/SecureFolderFS
Powerful, secure, modern way to keep your files protected.
Version Downloads Last Updated
1.0.4 420 11/28/2022
1.0.3 343 11/18/2022
1.0.2 360 11/17/2022
1.0.1 432 10/21/2022
1.0.0 433 10/16/2022

UTF16 Base4K(alphabetical) encoding for NET Core