public static class CatalogFormatReads and writes catalog.bin.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
Binary, and read before anything else on the device. The catalog is the first thing a game touches and nothing can be loaded until it is parsed, so it sits directly on the boot time of every session. A JSON catalog of ten thousand entries is megabytes of text and a second of parsing on a phone; this is a header, a string table and fixed-width records, and it parses in one pass with no allocation per entry beyond the strings themselves.
Strings are stored once. Every address appears in its own entry and again in the dependency list of everything that points at it, so a catalog without a string table stores the average address four or five times. The table also makes the file comparable: two builds of the same content produce the same bytes, which is what lets a content update ship a diff instead of a catalog.
Deterministic by construction. The string table is sorted, entries are written in address order and bundles in name order, so nothing in the output depends on the order a dictionary happened to enumerate in. Doc 12 gates the content build on producing identical bytes across three operating systems, and a catalog that reordered itself per run would fail that gate for no reason anyone could find.
Fields and properties (2)
public static ReadOnlySpan<byte> MagicThe eight bytes every catalog starts with.
public const int VersionThe format version this reads and writes.
Methods (2)
public static byte[] Write(ContentCatalog catalog)Writes a catalog.
public static ContentCatalog Read(ReadOnlySpan<byte> file)Reads a catalog.
Used by (27)
- ContentAddressablesRemote
- AssetMaterialSourceTestsVixen.Engine.Renderer.Tests
- AssetTextureSourceTestsVixen.Engine.Renderer.Tests
- CatalogFormatTestsVixen.Assets.Tests
- CatalogReferenceTestsVixen.Assets.Tests
- CompositorContentTestsVixen.Assets.Tests
- ContentCatalogTestsVixen.Assets.Tests
- ContentMountVixen.App.Hosting
- ContentUpdateVixen.Assets
- LooseContentSourceVixen.Assets
- ReferenceWorldVixen.Assets.Tests
- RemoteWorldVixen.Assets.Tests
- StreamedContentTestsVixen.Assets.Tests
- UpdateWorldVixen.Assets.Tests
- WorldVixen.Assets.Tests
- WorldRendererTestsVixen.Engine.Renderer.Tests
- ContentBuilderVixen.Editor.Assets
- ContentBuilderTestsVixen.Editor.Assets.Tests
- ContentMountTestsVixen.App.Tests
- ContentPipelineVixen.Editor.Assets
- DoctorRunnerVixen.Cli
- LooseContentVixen.Editor.Assets
- LooseContentTestsVixen.Editor.Assets.Tests
- RemoteContentMountTestsVixen.App.Tests
- SceneManifestTestsVixen.Editor.Assets.Tests
- StartupSceneTestsVixen.App.Tests
- VixenCommandTestsVixen.Cli.Tests