Copied in some of the relevant underlying scripts for ddr_compress.