package com.foxx.androidcast.network.transport.fec;

/*********************************************************************
 * FecEncodedGroup.java
 * Created at: Mon 18 May 2026 14:25:02 +0200
 * Updated at: Wed 20 May 2026 15:17:13 +0200 by Anton Afanasyeu <a.afanasieff@gmail.com>
 * Commit: 5d8e82d2e60a21fff3138d2a394ee4e8b4c6dcb8
 * class FecEncodedGroup
 * Contributors:
 *    - Anton Afanasyeu <a.afanasieff@gmail.com> (2 commits, 32 lines)
 *    - Cursor Agent (project assistant)
 * Digest: SHA256	cf8e39fe78582c20657f87f2b0121418e45485753750396bd752ca29a4b93a64
**********************************************************************/
/** Reed–Solomon shards ready for per-datagram transmission. */
public final class FecEncodedGroup {
    public final byte mode;
    public final int groupId;
    public final int originalLen;
    public final int dataShards;
    public final int parityShards;
    public final byte[][] shards;

    public FecEncodedGroup(byte mode, int groupId, int originalLen, int dataShards, int parityShards,
            byte[][] shards) {
        this.mode = mode;
        this.groupId = groupId;
        this.originalLen = originalLen;
        this.dataShards = dataShards;
        this.parityShards = parityShards;
        this.shards = shards;
    }

    public int totalShards() {
        return shards.length;
    }
}
