On Mon, 29 Mar 2021 07:17:31 +0300 Ecmel Berk Canlıer <me@ecmelberk.com> wrote: > This is what I do on Moonlander. Not by line, as binary data can be > sent over Gemini, but in 1029 byte chunks (exactly the max length of > one Gemini header. Saves me code in trying to split that too) That makes sense, it will even save me from having to mess with malloc and realloc. > I send each chunk into a separate "renderer" for the given file type, > which in text's case decodes it into the given encoding (default > UTF-8) and sends it over to the text/gemini parser which then does > the line splitting and parsing there. (And in other cases it will > just save the bytes directly to a file) One question, what do you do if a single line is split into multiple chunks? I will try checking your source for it, but I don't really understand or know Rust so I'm not sure I will understand it. ~almaember
---
Previous in thread (2 of 6): 🗣️ Ecmel Berk Canlıer (me (a) ecmelberk.com)
Next in thread (4 of 6): 🗣️ Ecmel Berk Canlıer (me (a) ecmelberk.com)