[librsvg] Comment about having to slurp the whole compressed file if using write()/close()



commit 1d467e45ca8d56836b7f2b48f6f7be5bd2ae9e8f
Author: Federico Mena Quintero <federico gnome org>
Date:   Tue Oct 3 17:52:58 2017 -0500

    Comment about having to slurp the whole compressed file if using write()/close()

 rsvg-base.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/rsvg-base.c b/rsvg-base.c
index c0b0298..360bf3c 100644
--- a/rsvg-base.c
+++ b/rsvg-base.c
@@ -1982,6 +1982,12 @@ rsvg_handle_close (RsvgHandle * handle, GError ** error)
     if (priv->state == RSVG_HANDLE_STATE_READING_COMPRESSED) {
         gboolean ret;
 
+        /* FIXME: when using rsvg_handle_write()/rsvg_handle_close(), as opposed to using the
+         * stream functions, for compressed SVGs we buffer the whole compressed file in memory
+         * and *then* uncompress/parse it here.
+         *
+         * We should make it so that the incoming data is decompressed and parsed on the fly.
+         */
         ret = rsvg_handle_read_stream_sync (handle, priv->compressed_input_stream, NULL, error);
         g_object_unref (priv->compressed_input_stream);
         priv->compressed_input_stream = NULL;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]