How would I compress thousands of blocks in json data into smaller data

No way it actually works!

I have a block data of 234,000 Bytes and compressed it using zlib lua,
the output was 297 Bytes which is a 99.87% decrease!

Thank you for mentioning the keyword to search!