I was thinking of using LZ4, but it doesn't really work that great on floating point, and images are already compressed (png, jpg, and even BCn, can't be compressed much further). So idk. Good thing about lz4 is that it's very simple[0] and probably faster then memcpy().
S3TC is block compression, so if there is repeating data in images it will compress quite well.
Just re-ran it (with -hc, version 1.9.3(latest now)) and: "Compressed 5592544 bytes into 5413783 bytes ==> 96.80%".
7z with "7z a -mx=9 -t7z asd.7z albedo_PNG_BC7_1.KTX" does 5592544 bytes to 4844707 bytes (down to ~87%).
Original file is 10227047 bytes (PNG, RGBA), i can't remember if the ktx has mipmaps.
EDIT: Note that the image is fairly noisy (gravel). Could/should be better with more "artificial" textures.
I don't know if ktx does some extra compression, but, looking at it, i doubt it.
PS I think that BC could be massaged at compression to be better compressible, and i think i read something about that. Don't remember.
>PS I think that BC could be massaged at compression to be better compressible, and i think i read something about that. Don't remember.
There's Oodle BC7Prep from RAD Game Tools: http://www.radgametools.com/oodletexture.htm
EDIT: RAD page states that "BC7 blocks that are often very difficult to compress", so that might be also a factor why my DXT5 test compressed much better than your BC7.
EDIT2: Yeah, with BC7 LZ4 only compresses it down to 4.6MiB.
You could further optimize by profiling access patterns during QA testing. There wouldnt be 1 global ideal ordering of assets if you had multiple scenes involved using varying subsets, but you could certainly group the most commonly used together using some implicit insert ordering during creation. This would help to minimize the total number of filesystem block accesses you require.
I think one other important IO trick is to make sure you vacuum the sqlite database before you publish it for use. Presumably, these should be read-only once authored in this context of usage. This will clear out empty pages and de-fragment the overall file.
https://store.steampowered.com/news/app/991270/view/18064466...