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 the
protocol or the gemtext specs.

Noone stops you from:

* writing an article (arbitrary size, consider it big for the
  argument)
  => 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 downloaded
file and display it similar to LaGrange displaying image as if
they were "inline".


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


I would go the same route for extented text where I want to
control the presentation. Use \LaTeX, produce a .pdf file, offer
a download link in an plain/text abstract file, which is
indexed. 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.asc
Type: application/pgp-signature
Size: 861 bytes
Desc: not available
URL: <https://lists.orbitalfox.eu/archives/gemini/attachments/20210617/b2484298/attachment.sig>


More information about the Gemini mailing list