The patches in my prop278/21663 branch is the cleaned up versions of the patches in bugs/21663 branch which is currently a bit of a mess.
The only part missing in the bugs/21663 branch is currently the streaming code for Zstd/LZMA, but the tor_compress() and tor_uncompress() functionality is working (and passing tests).
I think it's realistic that this bug will be marked needs_review tonight (Danish time) when I'm done splitting things up into something that is reviewable, which will include patches for #21664 (moved) and #21662 (moved).
#21665 (moved) should be a very short fix, but is not included in the bugs/21663 branch currently; we currently pass UINT64_MAX to disable the upper bound of memory consumption for LZMA.
I looked it over, and what's there looked fine, but I didn't see any actual lzma2 or zstd support. That's coming in the streaming code? If so I'll have another look later in the day