I know DNG supports zip compression. However, I want to use lz4 compression, as I am saving the file in realtime, and I cannot see any zip library matching the performance of lz4 for 16-bit RAW.
In my case this is 12-bit data with 4 bits set to zero.