2 ms·
For instance using LZMA or zstd as the final stage. Quite often that's enough to put them on a par with more radically different newer formats. If you do that
by userbinator 4y ago
For instance using LZMA or zstd as the final stage. Quite often that's enough to put them on a par with more radically different newer formats.
If you do that with a video codec, you lose the ability to seek within the stream, which makes it useless for streaming video. For images, the amount of memory required to decompress may become excessive.
It's similar to why zip (deflate) is still widely used, but is far from optimal in compression efficiency; everything that does better (in some cases much better) is going to be slower, bigger, or both. See https://en.wikipedia.org/wiki/PAQ https://en.wikipedia.org/wiki/PAQ for an example of extreme lossless compression.
- traverseda 4y agoI use zstd in my btrfs filesystem as a transparent file compression. I can still seek inside files.
- heavyset_go 4y agobtrfs does compression at the block level, whereas video compression would do it at the stream level. Files themselves are not compressed on btrfs, it's the blocks that get compressed.
- formerly_proven 4y agoVideo streams are generally compressed in blocks called group of pictures (GOP) as well. That's how seeking in a video stream works - skip to the beginning of the GOP the desired timestamp is in, start decoding from there and show images once the timestamp is reached.
- traverseda 4y agoWell that was kind of my point, why assume that the above poster would go for the most naive possible implementation when thinking about it for more than a minute yields several obvious solutions, and there are known implementations that have already solved that problem? ZSTD also has some fun "dictionary" operations so that even if you're chunking your data you can still take advantage of cross-chunk redundancy by "training" across all your chunks before the compression stage.
- adgjlsfhk1 4y agoyou could probably do something really good using zstd dictionary compression where you compress each frame separately but have them share a dictionary