I remember seeing this in an extracted NPK, but never looked into it. If you want to have a crack, try binwalk -Me routeros*npk, then load _routeros*npk.extracted/squashfs-root/lib/modules*/misc/flash.ko into ghidra or your preferred decompiler. At least 7.7-arm has some pretty strings for pointers:
000161fd "flash ERROR: radio data lz77 decompress failed: %d\n"ds
00016653"lz77_compress verify ERROR: orig len %d, new len %d\n"ds
It looks like there is not a magic header like in the lzo decompress.