durableOffset method

int durableOffset(
  1. int position
)

Plaintext offsets below this are safely on disk; everything after must be re-downloaded after a crash. Used by the download engine to persist resumable progress.

Implementation

int durableOffset(int position) => position - position % chunkSize;