- Make PTCACHE_COMPRESS_ an actual enum
- Clarify that while it looks like bitmask, it really is just an enum
- Make ptcache_file_compressed_write take similar arguments as
ptcache_file_write (item count and item size)
- All callers of ptcache_file_compressed_write were doing compressed
result memory allocation in exactly the same way; just make it happen
inside the function itself. This also makes it no longer need
the callers to do "is this zstd?" check around the call.
- The lzma "props" buffer was dynamically allocated for no good reason,
just make it a simple array, and clarify the variable names.
- Remove BLI_assert_unreachable() from ptcache_file_compressed_read;
asserts are for "impossible" situations; this one just happens any
time one opens a 4.x file with caches in 5.0.
Pull Request: https://projects.blender.org/blender/blender/pulls/144193