Closed lephilousophe closed 3 years ago
Looks great. Just one thing: If the change of ZLIB_LEVEL
was intentional I think that should go into a separate commit since it's not really part of the purported change here. I don't know why geohot picked level 6 in the first place, so I think some visibility for that change would be good if it turns out that there was some deeper meaning behind it...
Indeed, this was part of my tests and didn't pay attention when committing. The whole patch (dynamic allocation and zlib compression level set to 9) has been tested on ScummVM PS3 toolchain and has been proven to work on RPCS3 and real hardware
Merged. Thanks!
When creating big SELF,
def_buffer
may not be large enough to get the whole deflated section. Compacted data is then invalid. Make use ofdeflateBound
to allocate a buffer large enough to get the whole deflated stream.