Git Product home page Git Product logo

js-unzip's People

Contributors

augustl avatar gargaj avatar rdwallis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

js-unzip's Issues

when user select file from dialog, isZipFile return false

Good morning,
I make web application. I have small problem. User select zip file from your computer and i have blob from it. My code for load zip is:

var readerWorker = new FileReader()
var fileWorker = fileForOpen.files[0]
readerWorker.onload = function (e) {
      var text = e.target.result
      text = text.toString().substring(41)
      var zip = new JSUnzip(text)
      var isZip = zip.isZipFile()
      if (isZip) {
            zip.readEntries()
            for (var file in zip.entries) {
                  var withoutCompression
                  if (file.compressionMethod === 0) {
                        withoutCompression = file.data
                  } else if (file.compressionMethod === 8) {
                        withoutCompression = JSInflate.inflate(file.data)
                  }
            }
      }
}
readerWorker.readAsDataURL(fileWorker)

In the variable text is for example:

UEsDBAoAAAAAALKDfkLEb0P5GwAAABsAAAAIAAAAZGF0YS50eHRhYWFhYQpiYmJiCjI1CkdyYWZpawpjY2NjY2NQSwMECgAAAAAAwoN+QnOXrZQ4AAAAOAAAAAgAAABmb3RvLmpwZ3WrWopmoHv4In22rHuuEdJRjg3YQUABQCAAgAAAAD/3gAsAAAAAAUABQAAAgiMD5FnqwpSAQA4AUEsBAhQACgAAAAAAsoN+QsRvQ/kbAAAAGwAAAAgAAAAAAAAAAAAAAAAAAAAAAGRhdGEudHh0UEsBAhQACgAAAAAAwoN+QnOXrZQ4AAAAOAAAAAgAAAAAAAAAAAAAAAAAQQAAAGZvdG8uanBnUEsFBgAAAAACAAIAbAAAAJ8AAAAAAA==

If I debug it, I see in variable isZip value false. Why?

How to unzip a cab file with js-unzip

Hi,

Is there possible to unzip a cab(Cabinet) file with js-unzip? The cab file is produced from MS VisualStudio smartphone project and I just need to get a file in the cab. I got Error when reading Zip file: File is not a Zip file.

Thanks

Not support Zip file

simple use
when I run "unzipper.readEntries();"
got error "Uncaught File is using bit 3 trailing data descriptor. Not supported. "

what meaning?

Stream with distance reference over 1024 doesn't decompress correctly

The issue is that some distance codes need more then 8 extra distance bits, and the existing read_bits function didn't handle that case (it only appears to allow for extracting 8 bits). I changed the line that parses out the value to:

val = d.tag & (0xffff >> (16 - num));

and it seems to be decoding my stream correctly.

I am using this to decode a live stream so I don't have sample data readily available to submit with this report, although I could try to generate some.

BTW, I appreciate the readability of this code vs. most other deflate implementations that I looked at.

regression for js-unzip.js of Nov 6th

Tried updating js-unzip.js with the new release of Nov 6th and my page does not work anymore, the unzip process does not seem to ever end.

The page worked fine with the previous version of js-unzip, PROVIDED I ADDED THE "& 0xFF" JSUnzip.BigEndianBinaryStream.getByteAt

I tried debugging, but even after a relative long time (much longer that required for the older js-unzip.js to display the page) google chrome is still stuck in loops in js-unzip/js-inflate.

This is the page:
http://pgn4web.casaschi.net/zipped.html
This is the zipfile I'm trying to open:
http://pgn4web.casaschi.net/zipped.zip

Unzipper misses entry

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

readEntries not working if my zip file contains one xml file and .moc file

I have zipped one xml file and one .moc file. .moc is our project specific extension but actually content inside adhers to xml format.

In my application I get the url of this zip file hosted on network, I tried to use ajax call with GET to get the content from WEB url in blob object.

If I input this blob object for JSUnzip API and followed by that I am checking the number of entries.

If the ZIP file contains only xml file it is getting the entries properly but if mocf file is present in the zip it is not working.

  1. Any specific reasons why few file formats not supported?

  2. For a zip with xml file alone I got the entry properly but if I give that as input for inflate uncompressed = JSInflate.inflate(entry.data); (where entry = unzipper.entries[0]). I am getting uncompressed data as empty.

i.e. inflate is resulting empty data.

Please review and suggest your opinion.

entries.lengh is always 1

Hello,
I'm working out with test/integration/index.html & test/integration/test.js

I don't know why but entries.lengh is always equal to 1, even if the zip contains multiples files.

Can you help?

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.