Zstd is decidedly not a "large C application" though, more like a smallish library at best. The C reference implementation is also open source and thus likely part of the training set for coding LLMs. Any model re-implementing Zstd would probably be "remembering" how it was done originally, instead of implementing it from scratch.
By your argument it should have been able to just remember Pandoc existing implementation then? But it didn’t, you think they can only “remember” small code based well enough? I doubt that. Especially since after using LLMs quite a bit I am confident I could write my own specifications for something and LLMs would be able to do it properly, despite definitively not having seen it before.