WpfHexEditor.Core.ByteProvider
1.0.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package WpfHexEditor.Core.ByteProvider --version 1.0.0
NuGet\Install-Package WpfHexEditor.Core.ByteProvider -Version 1.0.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="WpfHexEditor.Core.ByteProvider" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="WpfHexEditor.Core.ByteProvider" Version="1.0.0" />
<PackageReference Include="WpfHexEditor.Core.ByteProvider" />
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 WpfHexEditor.Core.ByteProvider --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: WpfHexEditor.Core.ByteProvider, 1.0.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.
#:package WpfHexEditor.Core.ByteProvider@1.0.0
#: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=WpfHexEditor.Core.ByteProvider&version=1.0.0
#tool nuget:?package=WpfHexEditor.Core.ByteProvider&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
WpfHexEditor.Core.ByteProvider
Cross-platform byte provider for gigabyte-scale binary files — zero WPF dependency.
Features
| Component | Description |
|---|---|
ByteProvider |
Ultra-fast file I/O with virtual/physical position mapping, gigabyte-scale support |
EditsManager |
In-memory edit tracking (modify, insert, delete) without touching the original file |
UndoRedoManager |
Full undo/redo with batch transactions, coalescence, and description stack |
SearchEngine |
Boyer-Moore-Horspool pattern search (text, hex, wildcard), parallel for large files |
ChangesetSnapshot |
Immutable O(e) snapshot of pending edits for serialization and persistence |
FileProvider |
Stream abstraction (file, memory, read-only) with caching |
PositionMapper |
Virtual/physical offset mapping accounting for inserts and deletes |
ByteReader |
Intelligent reads with multi-layer caching |
Quick Start
Open a file and read bytes
using WpfHexEditor.Core.Bytes;
var provider = new ByteProvider();
provider.Open("firmware.bin");
// Read 16 bytes at offset 0x100
byte[] data = provider.ReadBytes(0x100, 16);
Console.WriteLine($"File size: {provider.VirtualLength} bytes");
Modify bytes with undo/redo
// Modify a byte
provider.ModifyByte(0x200, 0xFF);
// Insert bytes
provider.InsertBytes(0x300, new byte[] { 0x00, 0x01, 0x02 });
// Delete bytes
provider.DeleteBytes(0x400, count: 4);
// Undo / Redo
provider.Undo();
provider.Redo();
Console.WriteLine($"Can undo: {provider.CanUndo}");
Console.WriteLine($"Can redo: {provider.CanRedo}");
Search
using WpfHexEditor.Core.Search.Models;
var options = new SearchOptions
{
Pattern = new byte[] { 0x4D, 0x5A }, // MZ header
StartPosition = 0
};
SearchResult result = provider.Search(options);
foreach (var match in result.Matches)
Console.WriteLine($"Found at 0x{match.Position:X8}");
Changeset snapshot
// Capture all pending edits (O(e) — does not read the file)
ChangesetSnapshot snapshot = provider.GetChangesetSnapshot();
Console.WriteLine($"Modified ranges : {snapshot.Modified.Count}");
Console.WriteLine($"Inserted blocks : {snapshot.Inserted.Count}");
Console.WriteLine($"Deleted ranges : {snapshot.Deleted.Count}");
Console.WriteLine($"Has edits : {snapshot.HasEdits}");
Project Structure
WpfHexEditor.Core.ByteProvider/
├── Bytes/
│ ├── ByteProvider.cs ← Main entry point
│ ├── ByteProvider.Search.cs ← Search integration
│ ├── ByteProvider.Changeset.cs ← Changeset snapshot
│ ├── EditsManager.cs ← Edit tracking
│ ├── UndoRedoManager.cs ← Undo/redo stacks
│ ├── FileProvider.cs ← Stream abstraction
│ ├── PositionMapper.cs ← Virtual/physical mapping
│ └── ByteReader.cs ← Cached reads
├── Search/
│ ├── Services/SearchEngine.cs ← Boyer-Moore-Horspool
│ └── Models/ ← SearchOptions, SearchResult, SearchMode
├── Services/
│ └── UndoRedoService.cs
└── Changesets/
└── ChangesetSnapshot.cs ← ModifiedRange, InsertedBlock, DeletedRange
Dependencies
None. Zero external NuGet dependencies. Pure .NET 8.0.
License
GNU Affero General Public License v3.0 — Copyright 2026 Derek Tremblay. See LICENSE.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. 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.
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Initial public release — cross-platform ByteProvider with zero WPF dependency.