I tried to customize inflate () in your library, but actually I could not. Because custom_inflate will always be 0.
Therefore, I propose to add lodepng_decoder_settings_user_regist() API. Calling this API before actually handling png first will customize the initialization by lodepng_decoder_settings_init() and will be able to use custom_inflate etc.
Another suggestion is to add size_t outbuffsize to the custom_inflate function. In other deflate implementations such as libdeflate, the memory size secured in the output destination buffer is required as a parameter. If you give 0 to this you can not actually return an error.
hi,
I tried to customize inflate () in your library, but actually I could not. Because custom_inflate will always be 0.
Therefore, I propose to add lodepng_decoder_settings_user_regist() API. Calling this API before actually handling png first will customize the initialization by lodepng_decoder_settings_init() and will be able to use custom_inflate etc.
Another suggestion is to add size_t outbuffsize to the custom_inflate function. In other deflate implementations such as libdeflate, the memory size secured in the output destination buffer is required as a parameter. If you give 0 to this you can not actually return an error.