/** * `parseHeader` — the orchestrator. * * Layer 2. Sole owner of header validation ORDER. Every check below is numbered, and the numbers * are the contract: under `strict` the FIRST would-be diagnostic throws, so the order decides * which error a broken file reports, and a test pins it. Moving a check is a behavioural change * even when every individual check is unaltered. * * The order is not arbitrary. Each step establishes something the next one needs: * * 1. at least 256 bytes 8. the record size, hence the file geometry * 2. the variant, hence sample width 9. the record count, which needs 8 and the source size * 3. ns, before any ns-sized work 10. the EDF+ annotations requirement * 4. the whole header is present 11. the text fields, which nothing else depends on * 5. the declared header size (loses) * 6. the record duration * 7. the per-signal blocks * * `sourceByteLength` is required and positional because two of those steps genuinely need the * size of the file the header came from: recovering `recordCount = -1`, and telling a truncated * file from a complete one. */ import type { EdfHeader, ParseOptions } from '../types.js'; /** * Parse an EDF/BDF header. * * `headerBytes` must hold at least `256 * (ns + 1)` bytes; anything beyond that is ignored, so a * caller that over-read is free to pass its whole buffer. `sourceByteLength` is the size of the * file those bytes came from — pass `bytes.byteLength` for an in-memory file. */ export declare function parseHeader(headerBytes: Uint8Array, sourceByteLength: number, options?: ParseOptions): EdfHeader; //# sourceMappingURL=parse.d.ts.map