<-- back to the mailing list

a space case for transparent gemtext compression

ew.gemini ew.gemini at nassur.net

Thu Jun 17 15:34:54 BST 2021

- - - - - - - - - - - - - - - - - - - 

Hello,

Francis Siefken <fsiefken at gmail.com> writes:

Attál gemininauts,
snip<
One simplistic idea is to check if the gmi is binary, and> assume it has been compressed with zstd and then automatically
decompress it in the client. It'd be just one extra step in
the gemini client. To assess thethe speed and data savings I
compressed a short story by Gene Wolfe with zstandard and
lpaq9, a page or so, representative of an average gemtext. The
compression and decompression speeds are below 30ms here. I
didn't precompress with a dictionary (for added significant
size reduction) as that would mean detecting the language
(from for example word frequency). Ideally the gmi would be
compressed one time on the server to avoid compressing (and
straining the solar powered pico on space) for each request.
11390 xicygnus.gmi
4098 xicygnus.gmi.0.lpaq9
4855 xicygnus.gmi.13.zst
5146 xicygnus.gmi.3.zst
How would people solve such use cases elegantly and within the
design philosophy?

Well, imho you do not neccessarily need any changes to theprotocol or the gemtext specs.

Noone stops you from:

filename.gmi* compressing this file with xz, say =
filename.gmi.xz* adding an abstract which describes the article =
filename-abstract.gmi* adding a link to the abstract =
filename.gmi.xz read more [compressed]* the abstract is added to your feed and/or index.gmi

The the user will decide whether to follow the link.The client software might be able to uncompress the downloadedfile and display it similar to LaGrange displaying image as ifthey were "inline".

Please bear in mind that the gemini protocol does not evenannounce the length of the content to follow.

I would go the same route for extented text where I want tocontrol the presentation. Use \LaTeX, produce a .pdf file, offera download link in an plain/text abstract file, which isindexed. No need for "complex machinery".

Cheers,~ew

snip<
kind regards,> Francis Siefken (NL)
gemini://fsiefken.srht.site

-- Keep it simple!-------------- next part --------------A non-text attachment was scrubbed...Name: signature.ascType: application/pgp-signatureSize: 861 bytesDesc: not availableURL: <https://lists.orbitalfox.eu/archives/gemini/attachments/20210617/b2484298/attachment.sig>