Qiieha
28th June 2012, 11:49
Hi,
I develeoped Client Server Communication with QSslSocket, The protocol of the communication is xml.
The xml strings can be very long and so I want to use compression.
I did it and it seems to work, but I get following message at the client:
qUncompress: Z_DATA_ERROR: Input data is corrupted
qUncompress: Z_DATA_ERROR: Input data is corrupted
qUncompress: Z_DATA_ERROR: Input data is corrupted
qUncompress: Z_DATA_ERROR: Input data is corrupted
qUncompress: Z_DATA_ERROR: Input data is corrupted
qUncompress: Z_DATA_ERROR: Input data is corrupted
qUncompress: Z_DATA_ERROR: Input data is corrupted
Server:
void Server::sendXML(QString message) {
QByteArray block;
block.append(message);
socket->write(qCompress(block));
}
Client:
void Client::readyReadSlot()
{
buffer.append(socket->readAll());
QString result(qUncompress(buffer));
}
It works, but what can I do against the error message.
thank u
I develeoped Client Server Communication with QSslSocket, The protocol of the communication is xml.
The xml strings can be very long and so I want to use compression.
I did it and it seems to work, but I get following message at the client:
qUncompress: Z_DATA_ERROR: Input data is corrupted
qUncompress: Z_DATA_ERROR: Input data is corrupted
qUncompress: Z_DATA_ERROR: Input data is corrupted
qUncompress: Z_DATA_ERROR: Input data is corrupted
qUncompress: Z_DATA_ERROR: Input data is corrupted
qUncompress: Z_DATA_ERROR: Input data is corrupted
qUncompress: Z_DATA_ERROR: Input data is corrupted
Server:
void Server::sendXML(QString message) {
QByteArray block;
block.append(message);
socket->write(qCompress(block));
}
Client:
void Client::readyReadSlot()
{
buffer.append(socket->readAll());
QString result(qUncompress(buffer));
}
It works, but what can I do against the error message.
thank u