CodeLogic.Common
4.5.2
dotnet add package CodeLogic.Common --version 4.5.2
NuGet\Install-Package CodeLogic.Common -Version 4.5.2
<PackageReference Include="CodeLogic.Common" Version="4.5.2" />
<PackageVersion Include="CodeLogic.Common" Version="4.5.2" />
<PackageReference Include="CodeLogic.Common" />
paket add CodeLogic.Common --version 4.5.2
#r "nuget: CodeLogic.Common, 4.5.2"
#:package CodeLogic.Common@4.5.2
#addin nuget:?package=CodeLogic.Common&version=4.5.2
#tool nuget:?package=CodeLogic.Common&version=4.5.2
CodeLogic.Common
General-purpose utility toolkit for CodeLogic applications. Provides imaging (SkiaSharp), hashing, caching, file handling, compression, and networking utilities.
Install
dotnet add package CodeLogic.Common
Features
- Imaging — resize, crop, convert between JPEG/PNG/WebP (via SkiaSharp), thumbnail generation, dimension validation, Base64 encoding
- Hashing — SHA256, MD5, HMAC helpers with string and stream inputs
- Caching — in-memory cache with TTL expiry
- File Handling — async read/write/copy/delete, directory management, path helpers
- Compression — LZ4 stream compression/decompression
- Networking — HTTP client helpers, download utilities
Quick Start
using CL.Common.Imaging;
using CL.Common.Hashing;
// Convert any image to WebP
using var input = File.OpenRead("photo.jpg");
var result = CLU_Imaging.ConvertImage(input, ImageFormat.Webp);
if (result.IsSuccess)
await File.WriteAllBytesAsync("photo.webp", result.Value.ToArray());
// Resize with crop
var resized = CLU_Imaging.ResizeImage(input, 200, 200, allowCrop: true);
// Hash a string
var hash = CLU_Hashing.SHA256("my-secret-data");
Documentation
Requirements
- CodeLogic 3.x or 4.x | .NET 10
License
MIT — see LICENSE
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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. |
-
net10.0
- CodeLogic (>= 3.2.0 && < 5.0.0)
- K4os.Compression.LZ4.Streams (>= 1.3.8)
- Newtonsoft.Json (>= 13.0.4)
- SkiaSharp (>= 3.119.2)
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 |
|---|---|---|
| 4.5.2 | 87 | 5/24/2026 |
| 4.5.1 | 109 | 5/24/2026 |
| 4.5.1-preview.56 | 82 | 5/24/2026 |
| 4.4.2-preview.53 | 46 | 5/24/2026 |
| 4.4.1 | 100 | 5/24/2026 |
| 4.0.5 | 93 | 5/15/2026 |
| 4.0.4 | 93 | 5/9/2026 |
| 4.0.3 | 93 | 5/9/2026 |
| 3.2.12 | 682 | 4/18/2026 |
| 3.2.11 | 106 | 4/18/2026 |
| 3.2.10 | 95 | 4/18/2026 |
| 3.2.9 | 92 | 4/18/2026 |
| 3.2.8 | 91 | 4/18/2026 |
| 3.2.7 | 91 | 4/18/2026 |
| 3.2.6 | 92 | 4/18/2026 |
| 3.2.5 | 98 | 4/18/2026 |
| 3.2.4 | 94 | 4/17/2026 |
| 3.2.3 | 96 | 4/17/2026 |
| 3.2.2 | 151 | 4/17/2026 |
| 3.2.0 | 102 | 4/17/2026 |
# CL.Common — Changelog
All notable changes to **CodeLogic.Common** are documented here. Versions follow
[Semantic Versioning](https://semver.org/).
## [4.5.0] — 2026-05-24
### Changed
- **Unified versioning.** All CodeLogic.Libs now share a single version line
controlled by `version.txt` in the repo root. This is a version alignment
release — no functional changes to this library.
## [4.0.4] — 2026-04-16
### Changed
- README + manifest refresh across every CodeLogic library for the v4
baseline. No functional changes vs 4.0.3.
- `LibraryManifest.Version` now reads from the assembly's `AssemblyVersion`
attribute at runtime instead of a hard-coded string.
## [4.0.2] — 2026-04-09
### Changed
- Aligned with the v4 baseline across all libraries.
## [4.0.0] — 2026-04-09
Major rewrite — republished as v4.0.0 to reset the version line under the
unified v4 baseline. All public APIs refreshed.
### Notes
- Bundles cross-platform native assets transitively for libraries that need
them (e.g. SkiaSharp for image handling).
- Earlier history is retained in the
[git log](https://github.com/Media2A/CodeLogic.Libs/commits/main/CL.Common).