Tree3.Converter
1.1.0
See the version list below for details.
dotnet add package Tree3.Converter --version 1.1.0
NuGet\Install-Package Tree3.Converter -Version 1.1.0
<PackageReference Include="Tree3.Converter" Version="1.1.0" />
<PackageVersion Include="Tree3.Converter" Version="1.1.0" />
<PackageReference Include="Tree3.Converter" />
paket add Tree3.Converter --version 1.1.0
#r "nuget: Tree3.Converter, 1.1.0"
#:package Tree3.Converter@1.1.0
#addin nuget:?package=Tree3.Converter&version=1.1.0
#tool nuget:?package=Tree3.Converter&version=1.1.0
Tree3.Converter
Tree3.Converter is a lightweight .NET library for converting decimal numbers to binary (and vice versa), supporting arbitrarily large numbers, input validation, and reusable utility methods.
Features
- Convert decimal strings to binary (or binary to decimal) asynchronously.
- Input validation and automatic removal of leading zeros.
- Supports numbers of any size using
BigInteger. - Thread-safe static classes for converters and utilities.
Usage
using Tree3.Converter;
string binary = await DecimalToBinary.RunAsync("12345");
// Output: "11000000111001"
string decimal = await BinaryToDecimal.RunAsync("11000000111001");
// Output: "12345"
string invalid = await DecimalToBinary.RunAsync("abc");
// Output: "N/A"
using Tree3.Converter.Utilities;
string cleaned = "000123".RemoveLeadingZeros(); // "123"
bool isValid = "12345".IsDigitsOnly(); // true
Performance
- Converts a decimal number with 100,000 digits to binary in ~7 seconds on .NET 9 / Windows 11 / Intel i5 CPU.
- Converts a binary number with 100,000 digits to decimal in ~0.5 seconds on .NET 9 / Windows 11 / Intel i5 CPU.
Release Notes � v1.1.0
- Refactored converter logic for performance and readability.
- Enhanced validation for decimal and binary inputs.
- Made all converter and validator classes static.
- Added reusable
Utilitiesclasses.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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 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. |
-
net9.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Tree3.Converter:
| Package | Downloads |
|---|---|
|
Tree3.Calculator
Performs addition, subtraction, multiplication, division, and modulo operations on arbitrarily large non-negative integers represented as strings. |
GitHub repositories
This package is not used by any popular GitHub repositories.
- Refactored converter logic for performance and readability.
- Enhanced validation for decimal and binary inputs.
- Made all converter and validator classes static.
- Added reusable Utilities classes.