/** The block profile a catalog `fec.blockProfile` may name: the one this library implements. */ export type FecBlockProfile = 'iso-ssbg1-v1'; /** Every accepted `fec.blockProfile` token. */ export declare const FEC_BLOCK_PROFILES: readonly FecBlockProfile[]; /** True for a block-profile token this library implements. */ export declare function isFecBlockProfile(value: unknown): value is FecBlockProfile; /** * Read a required `fec.blockProfile`. Throws on an absent token and on any * token other than `iso-ssbg1-v1`: there is no default and nothing is * inferred from the wire (draft-ramadan-moq-fec ยง5.1). * * @param where the catalog path of the field, for the error message. */ export declare function parseFecBlockProfile(value: unknown, where: string): FecBlockProfile; /** ISO/IEC 23008-1 C.3.3 ssbg_mode1: the two-octet packet length field. */ export declare const SSBG1_LENGTH_FIELD_BYTES = 2; /** The largest protected packet an ssbg_mode1 symbol of size T can carry. */ export declare function ssbg1MaxPacketLength(symbolSize: number): number; /** Whether a protected packet of `packetLength` bytes fits one T-byte ssbg_mode1 symbol. */ export declare function ssbg1FitsSymbol(packetLength: number, symbolSize: number): boolean; /** * Build one ssbg_mode1 source symbol (C.3.3): the protected packet's length * in two octets, network byte order, then the packet, then zero octets up to * T. The protected packet is the MMTP packet before its Source FEC Payload ID * is appended (C.4.2). * * @throws when `length + 2 > T`: the packet cannot be protected under this * profile, and silently truncating it would corrupt every repair symbol. */ export declare function buildSsbg1SourceSymbol(packet: Uint8Array, symbolSize: number): Uint8Array; /** * Recover the protected packet from one ssbg_mode1 source symbol: the bytes * the length field names. Returns null, never a guess, when the length field * points past the symbol or any padding octet is non-zero (C.3.3 padding is * all 00h), since either means the recovered symbol is not what was sent. */ export declare function trimSsbg1SourceSymbol(symbol: Uint8Array): Uint8Array | null; /** The SS_ID after the last source symbol of `[ssStart, ssStart + ssbLength)`. */ export declare function isoBlockEnd(ssStart: number, ssbLength: number): number; /** * Range membership (C.5.2, C.5.3): whether `ssId` is one of the * `ssbLength` consecutive SS_IDs starting at `ssStart`, modulo 2^32. */ export declare function isoBlockContains(ssStart: number, ssbLength: number, ssId: number): boolean; /** * A lower bound on how many blocks the block starting at `a` lies behind the * one starting at `b` (0 when `a` does not precede `b`). An iso-ssbg1-v1 * block holds at most `kMax` source symbols (the catalog `sourceSymbols`, the * AL-FEC maximum_k_for_repair_flow), so `n * kMax` SS_IDs always span at least * `n` blocks. Every interleave horizon in the receiver (decoder retention, * worker retirement, ordered-relay settlement) uses this one bound, so the * manager's horizon can never fall inside the decoder's. */ export declare function isoBlocksBehindLowerBound(a: number, b: number, kMax: number): number; //# sourceMappingURL=fec-block-profile.d.ts.map