-
-
Notifications
You must be signed in to change notification settings - Fork 203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reduce saved file size #489
Comments
From GVls support of Meson files, you can read a string an convert to Json.Parser parser = new Json.Parser ();
parser.load_from_data (str);
Json.Node node = parser.get_root ();
GLib.Variant v = Json.gvariant_deserialize (node, null);
commands.parse_variant (v); Above code takes a JSON formated code an convert to GVls has GVls.VariantObject, a non invasive interface that when implemented add a GLib.Variant,store helps to store a serialized binary version of Variant, the contrary form is use |
my knowledge in programming is very very very basic. but maybe it will help: |
We currently save our files in a
JSON
format which lists all the items and their properties.We also save the imported images in a dedicated folder to always have the original available even if the user resizes it or reduces the quality on the canvas.
Everything is packed together into a
.akira
file, which is actually a.zip
file.I'm looking for ways to reduce the file size without losing quality.
JSON content
@esodan suggested to convert the
JSON
file into a binary representation ofGLib.Variant
.That sounds like a good idea, but I have no idea how to do it and, so I'm totally open to suggestions and contributions.
Image size
We want to keep the originally imported image inside the saved file, but I'd like to find a way to reduce the file size in case the user imports many large images into its project.
Is there some sort of conversion, or non destructive compression that can be reverted on loading?
The images are automatically deleted from the saved file if the user removes every instance of those from the canvas, so there's no problem from that point of view.
The text was updated successfully, but these errors were encountered: