Le jeu. 17 sept. 2020 à 14:01, Werner LEMBERG <firstname.lastname@example.org
> a écrit :
> These are some horrible numbers that essentially test FT_Load_Glyph
> from compressed unifont.pcf.gz in reverse order: [...]
> real 0m6.062s
> The same string forward is much faster: [...]
> real 0m0.486s
> Is it well known that rewinding the compressed stream is so
> prohibitively expensive? Or, is this a bug?
I don't know, sorry. The basic question is, I guess, whether we are
correctly using the gzip interface ...
But in case one would really want to support this, it is possible to improve random access in gzip stream by essentially storing the state of the deflate decoder at various points of the input file. For a practical example, see:
So in theory, something like that could be added. It's just seems a lot of complexity for little practical benefits imho.