Есть ли способ сопоставления данных, собранных по потоку или массиву, в структуру данных или наоборот? В С++ это просто вопрос о том, чтобы указать указатель на поток как тип данных, который я хочу использовать (или наоборот для обратного) например: в С++
Mystruct * pMyStrct = (Mystruct*)&SomeDataStream;
pMyStrct->Item1 = 25;
int iReadData = pMyStrct->Item2;
очевидно, что С++-путь довольно небезопасен, если вы не уверены в качестве данных потока при чтении входящих данных, но для исходящих данных очень быстро и просто.