Skip to content
This repository has been archived by the owner on Sep 13, 2022. It is now read-only.

Unzipper misses entry #1

Closed
jakobholmelund opened this issue Jan 6, 2011 · 9 comments
Closed

Unzipper misses entry #1

jakobholmelund opened this issue Jan 6, 2011 · 9 comments

Comments

@jakobholmelund
Copy link

Hi august.. I have a problem.. For some unexplained reason the unzipper misses an entry in my epub file.. It reads the mimetype and the META-INF dir just fine, but when it comes to the dir OEBPS it just skips it and thus js-epub fails.. I hope there is a logical explanation hope you can help

Regards

Jakob

@augustl
Copy link
Owner

augustl commented Jan 6, 2011

The likely explanation is that the code was zipped with the standard zip library in Java, which doesn't create spec compliant Zip files, and in turn not valid EPUB files. But most people think that a .zip is a .zip and distribute corrupted EPUBs.

I'm not sure if this is the case with the EPUB file you are trying. I could investigate further if you could provide me with a reproducable test case or the file itself.

@jakobholmelund
Copy link
Author

Maybe you could point me to a free epub so that i can check it.. The one i'm working with is the one bundled with epubjs called Emma_Jane-Austen.epub, can be checked out from

svn checkout http://epub-tools.googlecode.com/svn/trunk/epubtools/epubjs epubjs

the zipper in rePublish doesnt have any troubles with it.. Though your unzipper looks far more suffisticated.. I'm storing the epub files in google app engines app store if that could have some effect.. ? im serving with content-type="application/zip"

@augustl
Copy link
Owner

augustl commented Jan 7, 2011

All the books on http://www.epubbooks.com/ comply to the standard, as far as I know.

I'll investigate the epub from the svn repo you pointed to.

@jakobholmelund
Copy link
Author

Hmm.. I think this have something to do with app engines blobstore it must do something when the file is uploaded or when the file is served.. Would really like to solve this one.. Is it possible to make you try and load a epub with xmlhttprequest from blobstore for me, and maybe tell me whats wrong ?

@sfornengo
Copy link

it seems the problem just appears using the minified version of js-unzip: js-unzip.min.js
using the plain version js-unzip.js, no more entries are missed.
I can send you a zip file with the problem...

@augustl
Copy link
Owner

augustl commented Apr 6, 2013

I've reproduced the error now. A fix is imminent.

@casaschi
Copy link

casaschi commented Apr 6, 2013

I tried the latest version of js-unzip.js and it fails processing this file:
http://pgn4web.casaschi.net/zipped.zip
The file contains 6 text files (5 with .pgn extension, 1 with .txt extension), but the following code reports only two entries:

var unzipper = new JSUnzip(httpResponseData);
if (unzipper.isZipFile()) {
unzipper.readEntries();
console.log(unzipper.entries.length);
}

An older version of js-unzip.js used to read that file properly (provided that the & 0xff trick was used).

@casaschi
Copy link

Any updates on the "imminent" fix for the missing entries?

@augustl
Copy link
Owner

augustl commented Jan 18, 2016

Hey!

I just deprecated this project. I was looking into fixing bugs and updating it, but I found a much better alternative that didn't exist when I created this project. Check it out :)

https://gildas-lormeau.github.io/zip.js/

@augustl augustl closed this as completed Jan 18, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants