how to uncompresses data byte array
I have QByteArray compressed with qCompress
how can uncompressed this data in other app not used Qt like android app written with java?
From the doc: "The compressionLevel parameter specifies how much compression should be used. Valid values are between 0 and 9, with 9 corresponding to the greatest compression (i.e. smaller compressed data) at the cost of using a slower algorithm. Smaller values (8, 7, ..., 1) provide successively less compression at slightly faster speeds. The value 0 corresponds to no compression at all. The default value is -1, which specifies zlib's default compression."
You simply need a way to use zlib in java.
Edit, for qUncompress, there is a 4 bytes offset compared to zlib's implementation.
@JohanSolo I write QByteArray compressed to file
when i open this file with some app support zip format like WinRar, 7Zip but can't open this file
this has been already discussed a hundred times.
- qCompress doesn't generate ZIP archive data as you know it from the typical (zip-files)
- zlib != zip
- Qt has no native support for compressed archive formats
Use a 3rd party library for this. Like QuaZip (which still should work i guess) or libzip (libzip++)
I'd also mention KArchive which handles .tar, .gz, .zip, .7z