RangeCalc
Type members
Classlikes
Offsets counters for a sequence of chunks that make up the complete file to retrieve only a part from it.
Offsets counters for a sequence of chunks that make up the complete file to retrieve only a part from it.
- Value parameters:
- dropStart
how many bytes to drop from the first chunk
- firstChunk
the number of the first chunk (starting from 0)
- takeChunks
how many chunks to take starting from
firstChunk
- takeEnd
how many bytes to take from the last chunk. If first and last chunk are the same, then the
dropStart
must be applied first
- Companion:
- object
Value members
Concrete methods
Given a chunkSize, generates an possibly infinite stream of chunk definitions.
Given a chunkSize, generates an possibly infinite stream of chunk definitions.
Calculates the offsets to use when fetching only a range
from a file. The given
chunkSize
is size for each chunk except the last one (which may have fewer bytes).
Calculates the offsets to use when fetching only a range
from a file. The given
chunkSize
is size for each chunk except the last one (which may have fewer bytes).
- Value parameters:
- chunkSize
the overall chunk size used; the last chunk may be smaller
- range
the given range that should be retrieved