Where to enforce minimum buffer len?

For page-aligned reads, I would not use buffering, and pass a page-sized buffer each time when reading, and be sure to be positioned at a page-multiple before each read. IO buffering isn’t intended for this use case, it’s intended for doing smaller reads than the buffer size and variable sized reads. With page reads, you’re always reading the page size (or a multiple of it).

I am not experienced with the readVec family of functions to make the claim, but would this be a good use case for them? My understanding might be incorrect, but it seems like a few rotating buffers of 8192 bytes could also be a solution?

Possibly, that requires more knowledge about the actual data, it either needs to be aligned to 8192 bytes or provide information about where each chunk in a header.
It would also increase the required memory which might be a concern.

I see, but fortunately it was an example, I just need the minimum buffer len, no alignment requirements. Data can also span across page boundary so I assume I will still need std.Io.Reader for all the takeStruct/peekStruct goodies (main reason why I am using it, it makes writing those decoding endian-specific protocol looks so nice)

For my exact use case, I need to decompress some data from an underlying Reader into a large enough buffer, which is bounded by 8192. Hence my minimum buffer len.