Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

ippsDecodeLZ4_8u (clarification)

axelriet
Beginner
106 Views

The documentation for ippsDecodeLZ4_8u is straightforward, but the sample code on the page increases the output buffer size by 33 bytes.

 

The requirement to add 33 bytes beyond what is necessary to hold the decompressed data is not documented for this parameter.

 

Are the 33 bytes mandatory? If yes, that makes the function (and therefore LZ4) unusable in many scenarios; for example, I decode into a buffer I don't allocate, so I don't control its size. If I have to allocate an intermediate buffer, copy the data, and free the buffer, that certainly negates any performance gain you may achieve by having those 33 bytes.

 

My concise question is: are the extra 33 bytes necessary?

 

If so, you should provide a new ippsDecodeLZ4Safe_8u function that never overruns the destination buffer defined by the decompressed data size.

 

Thanks,

Axel

 

0 Kudos
0 Replies
Reply