C++ (Qt) QByteArray ba; QDataStream s(&ba,QIODevice::ReadWrite); ba += "\n\n\n\n\n\n\n\r"; QVector<double> v; v.fill(-10,10); s.device()->seek(8); s << v;//serialization v.clear(); ba += "\n\n\n\n\n\n\n\r"; QByteArray b,a; a = ba.left(8); b = ba.right(8); qDebug() << a << b; s.device()->seek(8); s >> v;//deserialization qDebug() << v << v.size();