= 1024" x-on:close-sidebar="sidebar=window.innerWidth >= 1024 && true">
Fast Fold over the bytes of a block device
This functor use seek operations to perform fast folds over block devices.
val mapped_s : f:('a -> int64 -> Cstruct.t -> 'a Lwt.t) -> 'a -> A.t -> ('a, A.error) Pervasives.result Lwt.t
f across data blocks read sequentially from a block device. In contrast to
Fold.mapped_s will use knowledge about the underlying disk structure and will skip blocks which it knows contain only zeroes. Note it may still read blocks containing zeroes. The function
f receives an accumulator, the sector number and a data buffer.
val unmapped_s : f:('a -> int64 -> int64 -> 'a Lwt.t) -> 'a -> A.t -> ('a, A.error) Pervasives.result Lwt.t
f acc ofs len across offsets of unmapped data blocks read sequentially from the block device.
Fold.unmapped_s will use knowledge about the underlying disk structure and will only fold across those blocks which are guaranteed to be zero i.e. those which are unmapped somehow.