Re:Dr.Mario 64's gzip implementation is taken almost verbati...
by chrismeller on Monday October 19, 2020 @01:07PM
(#24828396)
I will completely trust your superior level of experience in this area regarding the coding approach.
I still think that, given the two pairs of screenshots we have, most of the code and comments looks like obvious boilerplate that could easily be identical. A couple of lines perhaps not, but it’s far from conclusive.
I spent a week banging my head against the FFI for Java to get MD5 C code wrapped, and then in a fit of pique tried to do an all-Java implementation.
Since Java is a C-family language, transcribing the code from the specification was a cakewalk, and I had something working within a day.
Because of the PNG work (and a fascination with compression) I've also spent some time in the zlib code, and the zlib code is... unusual. Among other things, it has longjmp support built in so you can do cooperative multitasking in single-threaded systems. That and some aggressive work to assert that there is sufficient free memory to run zlib properly, makes the code a bit more novel. I don't think you or I would write the code that way, so it's implausible that someone would accidentally replicate the code, in this scenario or any other.