uzlib error
Posted: Fri Jun 15, 2018 4:26 pm
I'm compressing data on a desktop with zlib before sending it over serial comms to a PyBoard via USB_VCP. The PyBoard then decompresses packets of data before processing them. I have confirmed that any overhead of compression or decompression is, in fact, compensated by the reduced transmission size, at least in the case of my particular application. In a few rare cases, I am finding that on a particular set of data, uzlib fails to decompress a zlib compressed set of data, throwing a ValueError (of -4 if that means anything). For completeness, I tested decompressing the same buffer on the desktop immediately after compressing it but before transmitting it, and of course, zlib on the desktop has no trouble decompressing its own compressed data. So it would appear that uzlib is not a perfect implementation of zlib.
Are there any known problems with uzlib? Is this result not necessarily surprising?
Are there any known problems with uzlib? Is this result not necessarily surprising?