PackedDataContainer
Obsolete packed Array/Dictionary resource with limited type support.
Marked Obsolete in SDK 1.0.0. Use ReckfellApi.VarToBytes or FileAccess.StoreVar for new binary data and Marshalls.VariantToBase64 for a Variant Base64 representation. Packing with this class is not data compression.
Pack accepts an Array or Dictionary root and replaces previous contents. Size counts root elements rather than bytes. A new empty resource has no valid header yet: first Pack a valid container or load a prepared resource; Size before that is diagnosed. __Data___ uses an internal format rather than JSON or binary Variant input for BytesToVar.
Nested type support is incomplete. Object/RID values become nil. Scalar Color has no handler in the current implementation: Pack can return Ok while reading yields a root-container reference rather than Color. Thus Ok does not establish fidelity for arbitrary Variant contents. This review reproduced the defect without changing engine sources. Cyclic and arbitrary containers were not tested.
Nested Array/Dictionary values are read as PackedDataContainerRef views retaining a source and offset rather than deep copies. Do not repack or change __Data___ while using old views. The SDK class exposes no direct C# indexer/IEnumerable; native Variant indexing was exercised through Expression rather than assuming foreach on the wrapper.
Dispose an owned resource after use. The hidden __Data___ setter validates no arbitrary input bytes; do not use it as an external-file validator. Only valid same-runtime data and the separately documented Color defect were exercised.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
PackedDataContainerConstructor
public PackedDataContainer();Creates an owned obsolete Resource without a valid packed root. Pack a valid Array/Dictionary before Size/lookup. Prefer current Variant serialization for new data.
Properties1
__Data___Property
public byte[] __Data___ { get; set; }Hidden internal byte[] storage of the obsolete resource. The getter returns a C# copy; the setter copies bytes/length without full structure/offset validation. Valid same-runtime byte transfer was tested. Supply no external/arbitrarily edited data and do not change the source while nested views are active.
Methods2
PackError
public Error Pack(Variant value);Replaces all contents with a packed Array/Dictionary and returns Error. Validates the root type rather than arbitrary nested types: Object/RID become nil and scalar Color can yield a wrong reference even with Ok in the current code. Neither compression nor cyclic-graph validation. Do not use old nested views after repacking.
| Name | Type | Default |
|---|---|---|
value | Variant | — |
valueAcyclic Array/Dictionary with prevalidated supported value types. Ok alone does not establish fidelity for arbitrary nested Variants.
ErrorError.Ok for an accepted root rather than proof of every type being preserved; an invalid root is diagnosed and rejected.
Sizeint
public int Size();Reads a valid root Array/Dictionary element count rather than __Data___ byte length. A new resource without a header produces a diagnostic; a valid packed empty container has Size=0.
intElement count rather than bytes; 0 can be an empty container or a diagnosed-failure fallback.