Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't load a zip file: lastIndexOf does not exist in class StreamReader #27

Closed
lostmsu opened this issue Jan 3, 2013 · 3 comments
Closed

Comments

@lostmsu
Copy link

lostmsu commented Jan 3, 2013

I'm trying to use jszip to read epub files (which are basically zip archives), but I face a problem with opening a file using new JSZip(data): it fails with error about non-existent lastIndexOf in class StreamReader. I found this class in jszip-load.js, and it actually does not contain this function.

@dduponchel
Copy link
Collaborator

Epub files should work : http://stuartk.com/jszip/test/?complexfiles=true&filter=epub
The lastIndexOf method is used on the streamreader.stream which should be a string. How do you load the epub file ? If you're using an ArrayBuffer or an Uint8Array, you might be interested by the issue #23.

@lostmsu
Copy link
Author

lostmsu commented Jan 3, 2013

Yeah, I guest this was due to ArrayBuffer. So this is a duplicate issue.

@dduponchel
Copy link
Collaborator

JSZip now reads ArrayBuffers and Uint8Arrays, check the documentation. Thanks for the bug report :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants