sms-ie icon indicating copy to clipboard operation
sms-ie copied to clipboard

Compress json to zip

Open sawka6630 opened this issue 1 year ago • 2 comments

Please add post-export zip compression of json files (created by auto backup feature particularly). It will reduce the target file size significantly. For example:

  • contacts.json file comes from 15.51 Mb to 673 kb when compressed using regular (level 6) compression and to 592 kb when compressed using the highest (level 9) compression,
  • calls.json file comes from 2.69 Mb to 109 kb (level 6) and to 99 kb (level 9).

In general this will allow to save ~17.5 Mb per day.

sawka6630 avatar Jun 08 '24 07:06 sawka6630

I agree that the space savings would be desirable. If and when we switch the format from simple JSON to (ND)JSON encapsulated in a ZIP file, then we'll get compression automatically (as is currently the case for messages), but format changes require careful consideration and planning, since they break backward compatibility.

tmo1 avatar Jun 09 '24 02:06 tmo1

Exporting contact the same way as messages - saving pictures as external files would be great. According to my simple check it could even generate a bit smaller export files:

% gzip -9c contacts-2025-09-01.json | wc 5342 31569 1508281

% grep data15__base64__ contacts-2025-09-01.json | gzip -9c |wc 3525 20391 1014248 % grep -v data15__base64__ contacts-2025-09-01.json | gzip -9c | wc 1345 7963 368656

fanto666 avatar Sep 18 '25 16:09 fanto666