Page 1 of 1

[Solved] File size shrank from 2MB to 1.1MB

Posted: Mon Feb 24, 2025 6:44 am
by Rarefoil
So I've been working on a big spreadsheet project, with over 2k lines and 40 columns, with over 220 charts. (incidentally its also been lagging like crazy)
I've also been backing it up periodically, and when I went to back up my progress today, I noticed that the size had shrunk from 2.01 MB (2,111,992 bytes) two days ago to 1.16 MB (1,227,663 bytes), despite me adding and/or editing over 200 lines across the 40+ columns since that time.

I also manually counted the number of charts in both versions and they came out close enough that I'm convinced that they're the same, and one or two charts wouldn't account for this difference.

Now, for the foreseeable future, I'll go along with the smaller newer version since it still collaborates with all the progress I made and saved my place. But nonetheless, I'd still like to know if this is normal behavior. I mean, if OpenOffice is automatically compressing some things, or maybe since I filled some spaces with the same info it was able to cut some redundant data off, then okay, great, sure, but I'd really like to know for sure that's what its doing and gain 100% peace of mind.

Re: ODS file size mysteriously shrunk from 2MB to 1.1MB. Why?

Posted: Mon Feb 24, 2025 1:00 pm
by Hagar Delest
Hi and welcome to the forum!

Have you deleted anything? Like a sheet, a chart, a pivot table or even conditional formatting? Such things can carry much hidden data that could count for the smaller size once removed.

If you still have the former file, you can open both of them (they are mere zip files) and compare their content.

Re: ODS file size mysteriously shrunk from 2MB to 1.1MB. Why?

Posted: Mon Feb 24, 2025 3:56 pm
by MrProgrammer
Rarefoil wrote: Mon Feb 24, 2025 6:44 am if OpenOffice is automatically compressing some things
OpenOffice uses ZIP to compress an ODS file. If ZIP detects patterns in the data it can compress them to reduce the ODS file size. It is not possible for you to determine from examination of your spreadsheet whether it will have patterns that ZIP can detect.

If this solved your problem please go to your first post use the Edit ✏️ button and add [Solved] to the start of the Subject field. Select the green checkmark icon at the same time.

[Tutorial] Ten concepts that every Calc user should know

Re: ODS file size mysteriously shrunk from 2MB to 1.1MB. Why?

Posted: Wed Feb 26, 2025 1:09 am
by Rarefoil
MrProgrammer wrote: Mon Feb 24, 2025 3:56 pm OpenOffice uses ZIP to compress an ODS file. If ZIP detects patterns in the data it can compress them to reduce the ODS file size. It is not possible for you to determine from examination of your spreadsheet whether it will have patterns that ZIP can detect.
Alright, that sounds like it could explain it. Could I know if there's an option to turn that on or off? Or would I just save it to another format if I didn't want the compression for whatever reason?

Re: ODS file size mysteriously shrunk from 2MB to 1.1MB. Why?

Posted: Wed Feb 26, 2025 10:59 am
by RoryOF
With a file of that size, or a file of any important content, best _not_ to work in foreign formats. Remain with the ODF formats (.odt, ods etc)

Re: ODS file size mysteriously shrunk from 2MB to 1.1MB. Why?

Posted: Wed Feb 26, 2025 12:17 pm
by robleyd
There is an option to save as Open Document Spreadsheet (Flat XML) .fods where the whole document is stored in one XML flat file.

There is a considerable difference in file size; for example, a 52 Kb .ods file that I saved as a .fods file became 1.4 Mb. This may not be ideal.