Convert a cache key, written under the hash whose hashTag is tag,
to a filesystem-safe filename: {tag}.{base64url(UTF-8 key)}, or the bare
base64url when tag is '' (. never occurs in base64url).
Zarr keys can include non-ASCII group/array names, so the key is
encoded to UTF-8 bytes before base64url conversion. The output
filename is safe across all browser OPFS implementations.
Bumping OPFS_ENCODING_VERSION invalidates any directory persisted
with a different output; loadMetadata treats it as a cold cache.
(The move of every dataset directory under the luxar/ namespace dir —
see opfs-root.ts — needed no bump: pre-namespace directories at the
OPFS root are simply never read again.)
Convert a cache key, written under the hash whose hashTag is
tag, to a filesystem-safe filename:{tag}.{base64url(UTF-8 key)}, or the bare base64url whentagis '' (.never occurs in base64url).Zarr keys can include non-ASCII group/array names, so the key is encoded to UTF-8 bytes before base64url conversion. The output filename is safe across all browser OPFS implementations.
Bumping OPFS_ENCODING_VERSION invalidates any directory persisted with a different output; loadMetadata treats it as a cold cache. (The move of every dataset directory under the
luxar/namespace dir — seeopfs-root.ts— needed no bump: pre-namespace directories at the OPFS root are simply never read again.)