Why is "compress file = off" by default? can we change it?

Blender has the ability to compress files, with the “compress” checkbox during save, and there is a preference “Save & Load -> Compress File” that controls the default setting for file compression for new blends. However, this preference defaults to OFF.

Why does “compress file” default to OFF?
Is it time to consider default it to ON?

Outside blender, the main reasons I’m aware of that files wouldn’t be compressed by default are (a) text files, because they are human readable, editable, and often diffable with revision control; (b) a single bit corruption can render a compressed file unreadable, wheras an uncompressed file would just have a small bit error that might be ignorable or manually fixable.

However, blend files are not human readable or traditionally diff-able, and file corruption has been virtually non-existant with current error correcting HDD and SSD storage.

Yet storing every blend file uncompressed by default, for every blender user, everywhere in the world, consumes a huge amount of extra storage.

Is it time to reevalate this and make “compress file = true” by default? Or is there still some reason to default to uncompressed files?

It’s 3x faster* to save an uncompressed file,storage space is cheap, time is expensive.

5 Likes

I would prefer a default of compressed, since I frequently deal with uploading blend files to the internet to share with friends. Most of the time people aren’t building scenes that take a very long time to save especially on modern hardware. However lowering upload times seems like a bigger concern. Furthermore, I think many users just aren’t aware of this feature, and are hence not taking use of compression that could be very useful.

This is a good datapoint. i’ll do some performance testing of big saves with compression and without.

I opened this question because network bandwidth is not as cheap. BlendSwap wraps all blends in zipfiles to compress them, and I was surprised at the extremely high compression ratios. Of course BlendSwap could automate opening and re-saving blends as compressed blends… but this wouldn’t stop the users from uploading uncompressed blends. So I became curious about why blends are not compressed by default, and I couldn’t find a sufficient answer. Thanks

my understanding is that blender uses zlib… Google snappy is 10x faster but only 2-3x less efficient compression. is it worth considering supporting a faster compressor so the files can always be compressed but still be very fast to save?

No matter how efficient compression is, it will always be slower. And it might also be harder to recover in case of file corruptions (I guess?).
Even the slightest slow down can make huge differences. Let’s say in a production file, with linked data from external .blend file, you basically multiply your timmes by the amount of linked files and uncompression, the more linked files the more time gest multiplied. But this principle is completelly irrelevant for the average user which might barely use one linked file or none at all.

At the end of the day, everyone has its own needs and constraints and it might just be nicer to just let choice up to the user.
So, IMHO, it should be possible to let the user choose it’s default Blender behavior. Including default file save options.

Until it’s possible, I guess the best option is to choose a default set which causes less issues in most cases, since the user can change it anyway.

See here for work on using LZ4 compression, it can actually speed up read/write depending on the circumstances:
https://developer.blender.org/D4402

2 Likes

Uncompressed blend files are binary diffable. Subversion supports this, for example. At the Blender Animation Studio we also have installed SVN hooks that prevent our artists from committing uncompressed blend files for this specific reason.

1 Like

Like @sybren said. I’m using cloud storage for all of my projects. When I do small edits and save, changes are often uploaded instantly, regardless how big file is. Compressed files would actually use much more internet transfer for everyone using services like Dropbox, Google drive, OneDrive etc.