View Single Post
Old 03-29-2019, 01:19 AM   #13
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 47,053
Karma: 169810634
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by ceridwen View Post
Changing the extensions of mixed-image zip files does work.

It's definitely not obvious to me, because fundamentally these are all the same type of file. Making the behavior depend on the extension doesn't make sense to me, but whatever. It's not something I would do in my day job, but obviously other people have different standards.
I'm not sure how to take your comment. Are you trying to say that a .epub file is the same as a .cbz file? Or are you saying that your ereader should be able to open any file(s) stored in a zip container and display the contents regardless of how the contents were created?

In the real world, the extension is used to indicate how to handle the file. While theoretically a better solution, analyzing the file contents to determine how to handle the file is a quick trip to code bloat and programmers beating their heads against the wall. So how would you recommend to tell an epub from a cbz? They both use a zip format container. There are quite a few other filetypes that use a zip container as can be told from the the sheer number of times the first two bytes of a file are PK or 0x50, 0x4B.

So in your day job, if you happen to rename a Microsoft Word document with a .txt extension, this would not cause any problems? Or take a compressed log file saved as a .tgz file and rename it as .doc? Try to smuggle a MP4 video onto the network by renaming it as .asc?
DNSB is offline   Reply With Quote