URLRequest and gzip

From the Internet I read that URLRequest sends an Accept-Encoding header by default. I also read that URLSession auto decompresses any data that’s returned compressed. However these are what the internet says. I go to the Apple docs and read the URLSession & URLRequest sections but I can’t find where does it say that it sends the Accept-Encoding headers by default or that it auto decompresses compressed data. I know it does the latter as I am able to parse compressed data and have to do nothing to decompress. Just tell me where this stuff is documented by Apple so I can read about it.

On a related note, I was looking for a way to gzip data and send it. I didn't find any native functions that did this, so I used this library: https://github.com/mw99/DataCompression

URLRequest and gzip
 
 
Q