Zstandard Compression Issues

Blender 3.0 changes the option for saving compressed .blend files to use Zstandard compression in place of GZip. Unfortunately, there is a bug in 3.0 which means that attempts to use third-party Zstandard utilties to compress .blend files probably won’t work.

The problem is that Blender expects a seek table to be present at the end of the file, even though this is supposed to be optional (and not part of the core spec).

I wrote a decompression/recompression tool called incompress (part of the render-useful collection) to convert .blend files between compressed and uncompressed formats, which takes this into account. So far it seems able to create Zstandard-compressed files that Blender will read.

One tricky thing about the Zstandard format is that the length of each frame of compressed data does not need to be explicitly stored anywhere. And the files that Blender saves do not contain these lengths. So you have to do some parsing of the contents of the frame to figure out how many bytes to read.

1 Like

As you say, there is a bug, and that one is fixed and also one of candidates for corrective 3.0.1 release. It’s also one-liner so have very high chance to make it into corrective release.

If it works fine for 3.1 alpha then as long as 3.0.1 contain bugfix I’d say there is no issue.