polyvecdecompress function

PolyVec polyvecdecompress(
  1. Uint8List r
)

Decompresses a polyvec from bytes using polydecompress on each polynomial.

Implementation

PolyVec polyvecdecompress(Uint8List r) {
  PolyVec v = PolyVec();
  for (int i = 0; i < KYBER_K; i++) {
    v.vec[i] = polydecompress(r.sublist(
        i * KYBER_POLYCOMPRESSEDBYTES, (i + 1) * KYBER_POLYCOMPRESSEDBYTES));
  }
  return v;
}