-- Leo's gemini proxy

-- Connecting to gemini.bunburya.eu:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

Support for gzip compression

https://www.reddit.com/r/geminiprotocol/comments/14asyxj/support_for_gzip_compression/

created by niutech on 16/06/2023 at 10:12 UTC*

5 upvotes, 3 top-level comments (showing 3)


Some Gemini documents (e.g. Wikipedia: `gemini://vault.transjovian.org/full/en/2022%20in%20science`) can get very lengthy and slow to load. Therefore I am proposing to use the optional gzip compression in Gemini responses.


This could be done in a backwards-compatible way, without altering the Gemini spec:


1. If compression is enabled in Gemini client, it appends a special query parameter (which could be hidden in address bar) e.g. `?__gemini_encoding=gzip` (or `&__gemini_encoding=gzip` if there is existing query string in the URL), telling the server that Gemini client supports gzip encoding,

2. If the server supports gzip encoding, it sends back a compressed response with a special MIME type, may it be `text/gemini+gzip` or `text/gemini; encoding=gzip`.

3. If the server doesn't support compression, it sends back an uncompressed response with `text/gemini` MIME type.


I've proposed such solution in Lagrange feature request[1]. What do you think?


1: https://github.com/skyjake/lagrange/issues/597



Comments


Comment by caja_que_muerde at 16/06/2023 at 14:43 UTC

2 upvotes, 0 direct replies


Things have been rejected for being far less "HTTP creep" than this, so I wouldn't hold my breathe.


Comment by ErnstlAT at 01/07/2023 at 18:31 UTC

2 upvotes, 0 direct replies


That page is 83K - I think it is a matter of the server to offer paged content or split content into smaller chunks. Not sure if 83K is really so unmanageable - if you can browse Reddit, then I think that 83K page should be comparatively small. I dont think this would get through from my gut feeling. But, you can propose it there:


https://gitlab.com/gemini-specification[1] and gemini://bbs.geminispace.org/s/Gemini


1: https://gitlab.com/gemini-specification


Comment by AntiAmericanismBrit at 17/09/2023 at 21:42 UTC

2 upvotes, 1 direct replies


Gemini uses TLS encryption. So in the spirit of "get the underlying library to do as much as possible" I would suggest turning on TLS compression.


This can be done without any change to the Gemini protocol, it should just be a simple change to the parameters we're giving to the TLS library somewhere.


-- Response ended

-- Page fetched on Thu May 2 19:24:04 2024