#1 2014-04-27 07:35

narayan
Senior Member
Registered: 2009-02-08
Posts: 471

The Extension command renames epub as zip

Hi

I am using the latest beta.

ReNamer cannot recognize epub extension. Its "ëxtension" command renames epub files as zip.

Last edited by narayan (2014-04-27 07:41)

Offline

#2 2014-04-27 11:04

Stefan
Moderator
From: Germany, EU
Registered: 2007-10-23
Posts: 1,161

Re: The Extension command renames epub as zip

A Epub file is a ZIP archive with epub extension.

epub file wrote:

PK xxxx mimetypeapplication/epub+zipPK xxxx META-INF/ PK


Perhaps Denis can recognize "mimetypeapplication/epub+zipPK" within the first 100 bytes?

Because there is a file named "mimetype" with "application/epub+zip" content inside a epub file.


http://www.hxa.name/articles/content/ep … _2007.html


Read the  *WIKI* for HELP + MANUAL + Tips&Tricks.
If ReNamer had helped you, please *DONATE* to Denis or buy a PRO license. (Read *Lite vs Pro*)

Offline

#3 2014-04-27 15:39

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,479

Re: The Extension command renames epub as zip

Indeed, EPUB as well as many other (DOCX, XLSX, etc) file formats are actually ZIP files. You can open them with any file compression tool.

However, as Stefan has noted, we can try using a little binary hint after the usual ZIP file signature:
* "mimetypeapplication/epub+zip" for EPUB
* "[Content_Types].xml" for DOCX/XLSX/PPTX

I've implemented this in v5.75.2 Beta.

Apart from that the only definitive way to correctly distinguish these file types is to extract the content of the ZIP file and match it against appropriate format specification. Perhaps, in a long run, it would be better to incorporate the power of TrID detection kit into the Extension rule.

Offline

#4 2014-04-28 10:55

narayan
Senior Member
Registered: 2009-02-08
Posts: 471

Re: The Extension command renames epub as zip

I agree!

Thanks for the update!

Offline

Board footer

Powered by FluxBB