It turned out neither of the approaches I suggested really supported a clean API. On the other hand, by adding some new functions to util/gmime-extra.c, I've managed to avoid too much code duplication. This version seems to be working, but it needs a few more tests and the usual polishing. Feedback on the g_mime_stream_gzfile_* internal api is particularly welcome. Looking at mime_node_open, there might be a slight performance improvement to use open instead of fopen (because gmime is going to buffer anyway). So it might make more sense to have g_mime_stream_gzfile_new take a file descriptor. _______________________________________________ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch