I am working on a project where I am trying to use LZ4 frame compression for backup. I would like to use custom malloc/free functions just like how gzip and ZSTD allows to use us.
Will it be possible for LZ4 to support this kind of custom alloc/free functions?
This is needed because the code where we are freeing the compression context might not be reachable by application if it error's out half-way. The custom functions would allocate the memory in certain contexts and that way it will be cleared once the context is released. This way we can avoid the memory leak.
Kindly note that I am willing to contribute the patch if we are open for this proposal and I am allowed to do so.
Regards,
Jeevan Ladhe