[librsvg/librsvg-2.40] Comment about having to slurp the whole	compressed file if using write()/close()
- From: Federico Mena Quintero <federico src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [librsvg/librsvg-2.40] Comment about having to slurp the whole	compressed file if using write()/close()
 
- Date: Wed,  4 Oct 2017 01:06:16 +0000 (UTC)
 
commit 0e10fd4463f7aca70f8731bd91e7eb6373cfbb26
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 6b7a2dd..57c9232 100644
--- a/rsvg-base.c
+++ b/rsvg-base.c
@@ -1844,6 +1844,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]