Skip to main content

Module stream

Module stream 

Source
Expand description

Caller-paged larger-than-RAM replica stream (E06.6).

A file is read in fixed PAGE_BYTES windows. The window is the only payload buffer on this path: the dataset is never loaded as a whole, and tests must not allocate a 42 MiB (or file-sized) replica buffer to prove paging. Sequential SHA-384 covers every page in order.

Structs§

PageWindow
Caller-owned 4 KiB window plus fill/peak counters.
PagedFile
Open replica file. Length is metadata, not a loaded buffer.

Constants§

PAGE_BYTES
Replica page window. Not a dataset allocation and not a 64 KiB QNF chunk.

Functions§

hash_file_pages
Sequential SHA-384 over every page. window is the only payload buffer.
verify_file_pages
Hash every page and require expected_len plus expected digest.
write_patterned_pages
Write page_count patterned pages. Holds at most one page in RAM.