csharp
public sealed class BundleOdbBackendReads chunks out of a .bundle. The runtime backend.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
Read-only, and holds the bundle rather than copying it — so a bundle backed by a memory-mapped file answers a read with a slice of the map and no allocation at all.
Fields and properties (2)
public bool IsReadOnlyWhether this backend refuses writes.
public int CountHow many chunks the bundle holds.
Methods (8)
public BundleOdbBackend(ReadOnlyMemory<byte> bundle, bool verifyChecksum = false, IDisposable? owner = null)Opens a bundle held in memory.
public static BundleOdbBackend Open(VirtualFileSystem files, VirtualPath path, bool verifyChecksum = false)Opens a bundle from a file, mapping it where the provider can.
public bool Exists(ObjectId id)Whether a chunk is here.
public bool TryRead(ObjectId id, out IOdbBlob? blob)Reads a chunk.
public bool Write(ObjectId id, ReadOnlySpan<byte> blob)Stores a chunk.
public bool Delete(ObjectId id)Removes a chunk.
public IEnumerable<ObjectId> Enumerate()Every chunk here, in id order.
public void Dispose()Closes the bundle, releasing the mapping if it owns one.
Used by (3)
- LocalBundleSourceVixen.Assets
- ObjectDatabaseTestsVixen.Core.Serialization.Tests
- RemoteBundleSourceVixen.Assets