LevelDb.Managed.Chromium
1.1.0
dotnet add package LevelDb.Managed.Chromium --version 1.1.0
NuGet\Install-Package LevelDb.Managed.Chromium -Version 1.1.0
<PackageReference Include="LevelDb.Managed.Chromium" Version="1.1.0" />
<PackageVersion Include="LevelDb.Managed.Chromium" Version="1.1.0" />
<PackageReference Include="LevelDb.Managed.Chromium" />
paket add LevelDb.Managed.Chromium --version 1.1.0
#r "nuget: LevelDb.Managed.Chromium, 1.1.0"
#:package LevelDb.Managed.Chromium@1.1.0
#addin nuget:?package=LevelDb.Managed.Chromium&version=1.1.0
#tool nuget:?package=LevelDb.Managed.Chromium&version=1.1.0
LevelDb.Managed
A pure managed .NET library for reading and writing LevelDB databases - no native binaries, no P/Invoke - with a Chromium layer on top for the stores Chromium-based apps (Chrome, Electron, CEF) keep on disk.
Two packages:
- LevelDb.Managed - the LevelDB format itself: reading live databases lock-free (log, sstables, MANIFEST, correct newest-wins merge semantics), append-only writing via
WriteBatch, and a raw record layer that surfaces superseded and deleted records for forensic use. - LevelDb.Managed.Chromium - Chromium's Local Storage on top of it: per-storage-key string key/value access, handling Chromium's key layout and value encodings.
Installation
dotnet add package LevelDb.Managed
dotnet add package LevelDb.Managed.Chromium
LevelDb.Managed.Chromium depends on LevelDb.Managed, so for Local Storage work the second command is all you need.
Usage
Reading a LevelDB database
using LevelDbManaged;
using ReadOnlyLevelDb db = LevelDb.OpenReadOnly(@"path\to\leveldb");
byte[]? value = db.Get("some-key"u8);
foreach ((byte[] key, byte[] val) in db.Enumerate())
{
// newest-wins view of the current database state
}
Writing
using LevelDbManaged;
using LevelDb db = LevelDb.Open(@"path\to\leveldb");
WriteBatch batch = new();
batch.Put("key"u8, "value"u8);
batch.Delete("old-key"u8);
db.Write(batch);
Chromium Local Storage
using LevelDbManaged.Chromium;
using ReadOnlyLocalStorageStore store =
LocalStorageStore.OpenReadOnly(@"...\User Data\Default\Local Storage\leveldb");
foreach (string storageKey in store.EnumerateStorageKeys())
{
IReadOnlyDictionary<string, string> items = store.GetItems(storageKey);
}
Writing works the same way through LocalStorageStore.Open and PutItems.
Raw records (forensics)
using LevelDbManaged;
LevelDbRecordReader reader = new(@"path\to\leveldb");
foreach (LevelDbRecord record in reader.ReadRecords())
{
// every record in the store, including superseded and deleted ones,
// with sequence number, operation, and source file
}
Safety model
- Reading never takes the LevelDB lock and is safe while the owning app has the store open; slightly stale data is possible.
- Writing appends to the active log and requires the owning app to be closed.
Scope
Reading covers the full live file set (CURRENT, MANIFEST, write-ahead log, .ldb sstables with snappy compression). Writing is append-only: put/delete batches framed onto the active log, replayed by LevelDB/Chromium on next open - no sstable authoring, no compaction. The comparator is pluggable (bytewise by default). IndexedDB decoding is not included.
License
| Product | Versions 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. 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. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 is compatible. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | 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. |
-
.NETFramework 4.7.2
- LevelDb.Managed (>= 1.1.0)
- System.Memory (>= 4.6.3)
-
.NETStandard 2.0
- LevelDb.Managed (>= 1.1.0)
- System.Memory (>= 4.6.3)
-
net8.0
- LevelDb.Managed (>= 1.1.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.