4 ms·
No need to scan the image if the last few bytes has a "footer" describing the length that precedes it. I still think I like adding it as a section better, thou
by asveikau 7y ago
No need to scan the image if the last few bytes has a "footer" describing the length that precedes it.
I still think I like adding it as a section better, though.
- kazinator 7y agoThe footer could work. If you round up the file to some reasonable power-of-two block size and put the footer right at the end of the last block, that would be highly portable; it would work on systems/devices that only write binary files in multiples of a block size (even if you write a short block at the end).