Expand description
Record content, canonical hashing and picture headers. Use the store
borrowed through SurfaceCx::content or LaunchInput::content so the host
binds reads and writes to the resource’s content lane.
Structs§
- Content
Store - An app’s handle to binary content: cheap to clone, passed to whatever needs it.
- Image
Format - A picture format, named by its file extension and media type.
Functions§
- hash_
bytes - Hash
bytesthe way every content address in the system is derived: BLAKE3, lower-case hex. - image_
format - The picture format
bytesstart with, from the signature alone: PNG, JPEG, GIF, WebP or SVG. Unlike [sniff] it needs no complete header, so it also answers for a truncated prefix. - image_
size - A PNG, JPEG, GIF or WebP picture’s format and intrinsic width and height, read from its
header.
Nonewhenbytesis no such picture or its header states no size. - valid_
hash - Whether
hashhas the shape of a content address (64 lower- or upper-case hex digits). Addresses arrive from documents and peers, so anything else is refused before it can name a path.