BlobPack¶
- class dsviper.BlobPack(descriptor)¶
Bases:
objectSeveral memory regions packed into one blob, described by a BlobPackDescriptor.
Write with a BlobPackBuilder, whose build() answers the blob; from_blob() reads that blob back. query() or check() then answers a BlobPackRegion, which says where its bytes sit - see its blob().
BlobPack(descriptor) builds a pack whose regions are all zeros: the pack a BlobPackBuilder over descriptor answers before anything is written.
- check(name: str) BlobPackRegion¶
Return the BlobPackRegion registered under name, or raise if the pack has no such region.
- query(name: str) BlobPackRegion | None¶
Return the BlobPackRegion registered under name, or None if the pack has no such region.
- regions() list[BlobPackRegion]¶
Return the BlobPackRegion list, in the order the descriptor registered them.