Hacker News new | past | comments | ask | show | jobs | submit login

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.




The 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).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: