tynet-lichat/shirakumo - IRC Chatlog
Search
20:33:46
shinmera
I just realised that what I made so far is pretty neat for decoding, and only decoding the bits you need at a time
20:34:04
shinmera
but it's... really not great for *encoding*, or rather, for constructing the necessary structures to serialise them.
20:36:42
shinmera
Part of the issue is the ever present disparity between streams and in-memory representations.
20:37:39
shinmera
right now the library can't deal with non-file-streams because it has to seek to allow partial decoding.
20:38:41
shinmera
I guess what it needs is extra structure fields which represent the decoded contents. When decoding from a regular stream, it'll auto-fill those, otherwise leave them unbound.
20:38:57
shinmera
When crating new files, you fill those in, and upon serialisation it does backfill/whatever necessary.
20:43:43
shinmera
Though that, too, is not fantastic as it doesn't allow the "stream to disk/wherever"
2:08:18
Colleen
Shinmera: there is the option of (something like) the classic SAX/DOM model? i.e. low-level reader which emits "events", high-level reader which emits a DOM. This could be extended for partial decoding by adding some feedback protocol to the SAX part which allows the client to select which subsequent events it cares about?
2:08:18
SAL9000
Shinmera: there is the option of (something like) the classic SAX/DOM model? i.e. low-level reader which emits "events", high-level reader which emits a DOM. This could be extended for partial decoding by adding some feedback protocol to the SAX part which allows the client to select which subsequent events it cares about?