문제

I want to do Run Length Encoding on a Qt QByteArray of largely redundant image data. Right now I am using QByteArrays qCompress and qUncompress functions which use zlib with the default compression parameter.

After Googling I haven't found any third party libraries or Qt components that seem to do RLE out of the box. Can anyone point me to RLE Encoding for Qt?

Thanks -

도움이 되었습니까?

해결책

There is no RLE that I could find in Qt or third party. For QByteArrays, qCompress and qUncompress work OK for compressing but are not able to work with zlib standard compressiom from other sources due to the fact that these Qt functions prepend an extra 4 bytes to the data describing the QByteArray. Quazip ( http://quazip.sourceforge.net/ ) looked promising but was overkill for my needs. I just wrote my own RLE.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top