Hello guys!
I am beginning developer in Qt arrived from Delphi community.
In Delphi i used Zlib library for compressing and decompressing buffers allocated in memory.
Now in my Qt project i need to decompress buffer represented by QByteArray, previously compressed by Zlib library.

I try to use
#include <QtZlib/zlib.h>

For example here is my zlib packed buffer

RawDataLen = 50; // length if initial data buffer
CompressedDataLen = 24; // length of zlib compressed data buffer
unsigned char buf[24] = {120, 218, 99, 96, 0, 1, 70, 24, 96, 66, 0, 102, 24, 96, 65, 0, 86, 32, 0, 0, 8, 52, 0, 123}; // Zlib compressed buffer

unsigned long int compressBufLength = CompressedDataLen;
unsigned long int uncompressLength = RawDataLen;

int uncompressValue = uncompress(uncompressBuf,&uncompressLength,buf,com pressBufLength); // here i am trying to decompress buffer

But resulted uncompressValue value is 0
What is wrong ?