When you pass a string to buffer.fromstring(), the string will automatically be compressed with ZSTD compression! You can theoretically pass the buffer object to HttpService:JSONEncode(), it would give you that compressed string encoded in zbase64 (or normal base64 in short strings) and it would be possible to get the raw ZSTD compressed string by just decoding the zbase64. You could also reverse that process by encoding the compressed string in zbase64, reconstructing the JSON and passing it to HttpService:JSONDecode(), and that should give you a buffer object which you can use buffer.tostring() on, and you would have the decompressed string.
part of me wants to wasynth a zstd impl so people stop asking for this.
zstd has a really confusing specification which is why this doesn’t exist yet. Theres a basic decompressor written in pure C99 on the repo that you could copy but that only decompresses.