You are right, it would go into the first generation and will be collected pretty quickly unless it is more than 85KB which many strings that you want to compress are. If you go into that string length you get into the Large Object Heap and that is a disaster.
Unsafe work should not be scary. If you check out the code of GetByteCount for UTF8 encoding (as an example) you will see that Microsoft did the same thing.