-
Notifications
You must be signed in to change notification settings - Fork 5
Description
I understand that bbf is intended to be a container format, like mkv, but it would be really nice if it could also reduce file size (beyond deduplication) using some kind of compression scheme.
In terms of usage, this could be an option like --compression [scheme] in the CLI tool (optionally coupled with a .bbz or similar extension for distinction).
I assume the format is primarily intended for image collections, and I know that most image files are already compressed, which is why you usually don’t gain much by applying conventional archive compression. However, unlike collection formats such as zip, which are designed for arbitrary file types, bbf (as it is intended to be used) has the advantage of targeting a much narrower range of formats, e.g., image formats.
For image collections, this means we could use methods that exploit cross-image redundancy.
Consider this example:
I have a folder containing 8 large grayscale PNG files totaling 51.1 MB.
Creating a 7z archive with these files, as expected, does not result in much size reduction, if any.
But what if we use a format that leverages cross-image redundancy, such as a video codec?
A command like ffmpeg -framerate 1 -pattern_type glob -i "*.png" -c:v libx265 -crf 28 output.mp4
produces a file that is only 7.46 MB.
Since the images were encoded as a 1 fps video, extracting them is straightforward: ffmpeg -i output.mp4 -vsync 0 frame_%04d.png
Reducing 51.1 MB to 7.46 MB is a significant improvement.
Incorporating such a compression scheme would make bbf valuable not only for metadata and hierarchical categorization, but also for meaningful storage reduction.