/** * Joining chunks that a read returned as several. * * Layer 7, and pure: nothing here reads. `readWindow` splits at every discontinuity, so a window * over an EDF+D file comes back as one chunk per contiguous run ONCE THE INDEX IS COMPLETE. With * the probed index `openEdf` hands you it does not return several chunks — it throws, because a * pair of probes cannot say where the gap is, and `buildRecordIndex` is what changes that. This * said the first half flatly until 0.6.71, which described a call that throws on the index a * reader has at that moment. * * Code that then wants ONE array — a filter, an FFT, a CSV writer — has to join them, and joining * is where the gap gets lost. * * Concatenating two runs separated by five minutes produces an array in which sample `i` and * sample `i + 1` are five minutes apart. Every time derived from an index past that point is * wrong by five minutes, and nothing in the result says so. `mergeChunks` refuses instead. A * caller who genuinely wants the samples end to end can concatenate them in three lines and own * the consequence; what they should not get is a helper that hides it. * * The refusals are caller mistakes, not file defects, so they are plain `RangeError`s — the same * convention every option check in the package follows. */ import type { EdfChunk } from './types.js'; /** * One chunk covering every input chunk, or a `RangeError` explaining why they do not join. * * Accepts only chunks that are adjacent, in order, gapless, and read with the same signals in the * same order. A single chunk is returned as-is, so the common continuous-file case costs nothing. * * The samples are copied, so the result holds a second copy of the data the inputs already hold. * That is unavoidable — `Int32Array`s are not splices of one buffer — and it is why this is a * separate call rather than something `readWindow` does on the way out. */ export declare function mergeChunks(chunks: readonly EdfChunk[]): EdfChunk; //# sourceMappingURL=chunks.d.ts.map