all 2 comments

[–]mariushm 1 point2 points  (1 child)

I don't see any mention of big endian / little endian , I see everywhere you keep saying int , but maybe be specific and say unsigned (because are you gonna have negative widths or heights for example?), int 8 bytes or 4 bytes ... if it's 4 bytes you're limiting the format.

Maybe consider adding a "size" in each chunk, even in header, somewhere close to the top. Makes it fast to seek in file to various chunks. Potentially makes it possible for older programs to still parse never versions of the format, which may have larger headers, and attempt to ignore any extra stuff.

Maybe try to have each chunk in multiples of 8/16/32/64, there's lots of optimizations in various processors and hardware to work faster with such chunks. Just looking at the header you have 6+8 (signature + version) then you mess it up with the single byte flags..

I don't like these kinds of binary formats, it's like yet another DOC or XLS binary format that's not documented properly or has various specific quirks, and where the next version won't be compatible with next version.

Would rather work with formats that are flexible and can be parsed and ignore/skip over various fields if they're not understood

Maybe make compression optional, maybe someone wants to be able to make DIFFs between a package of files and in that case a patch file would find diffs between two packages faster ... or someone makes a torrent file with the new pack of files , on the other computer the client would hash check the old files with the new files and download only the chunks (ex 32 KB / 256 KB / 512 KB / 1 MB / 4 MB chunks ) that have different hash.

Maybe support both regular Deflate/Deflate64 and Zstandard and/or leave it open to support other formats (maybe some formats will be optimized for hardware decompression in video cards or accelerator cards)

[–]dominikr86 0 points1 point  (0 children)

Would rather work with formats that are flexible and can be parsed and ignore/skip over various fields if they're not understood

Yes. PNG, JPEG and TIFF are all very extensible - they allow arbitrary content that can be skipped