With both compressed and uncompressed datablocks both taking up 127 bytes, it looks like a quick and dirty compression method would be:
read chunks of 127 bytes. If bytes all match, compress. If there's mismatch, run as uncompressed.
EDIT: And of course, you don't need to recompress; you can just insert the newly uncompressed section into the scenario file and change the section header to account for the new length and change the COMPRESSED flag from "Y" to "N" and it'll load in game
