Git Product home page Git Product logo

Comments (8)

webmutation avatar webmutation commented on May 22, 2024

That does not fix the issue... test

function importZipToFilesystem(callback) {
    zipFs.importHttpContent(URL, false, function() {
        zipFs.root.getFileEntry(filesystem.root, callback,
            function(current, total){
                var totalPercentage = (current / total) * 100;
                console.log("onprogress: "+current+"total: "+total + ": "+Math.round(totalPercentage,2)+"%");
            },
            onerror);
    }, onerror);
}

This results in:
onprogress: 6099658total: 6159972: 99% test12.js:40
onprogress: 6623946total: 6159972: 108% test12.js:40
onprogress: 6102123total: 6159972: 99% test12.js:40
onprogress: 6626411total: 6159972: 108% test12.js:40
onprogress: 6104296total: 6159972: 99% test12.js:40
onprogress: 6628584total: 6159972: 108% test12.js:40
onprogress: 6108101total: 6159972: 99% test12.js:40
onprogress: 6632389total: 6159972: 108% test12.js:40
onprogress: 6110440total: 6159972: 99% test12.js:40
onprogress: 6634728total: 6159972: 108% test12.js:40
onprogress: 6116259total: 6159972: 99% test12.js:40
onprogress: 6640547total: 6159972: 108% test12.js:40
onprogress: 6118637total: 6159972: 99% test12.js:40
onprogress: 6642925total: 6159972: 108% test12.js:40
onprogress: 6121838total: 6159972: 99% test12.js:40
onprogress: 6646126total: 6159972: 108% test12.js:40
onprogress: 6124152total: 6159972: 99% test12.js:40
onprogress: 6648440total: 6159972: 108% test12.js:40
onprogress: 6129858total: 6159972: 100% test12.js:40
onprogress: 6654146total: 6159972: 108% test12.js:40
onprogress: 6132118total: 6159972: 100% test12.js:40
onprogress: 6656406total: 6159972: 108% test12.js:40
onprogress: 6136614total: 6159972: 100% test12.js:40
onprogress: 6660902total: 6159972: 108% test12.js:40
onprogress: 6139416total: 6159972: 100% test12.js:40
onprogress: 6663704total: 6159972: 108% test12.js:40
onprogress: 6145408total: 6159972: 100% test12.js:40
onprogress: 6669696total: 6159972: 108% test12.js:40
onprogress: 6145955total: 6159972: 100% test12.js:40
onprogress: 6670243total: 6159972: 108% test12.js:40
onprogress: 6156164total: 6159972: 100% test12.js:40
onprogress: 6680452total: 6159972: 108% test12.js:40
onprogress: 6156642total: 6159972: 100% test12.js:40
onprogress: 6680930total: 6159972: 108% test12.js:40
onprogress: 6157119total: 6159972: 100% test12.js:40
onprogress: 6681407total: 6159972: 108% test12.js:40
onprogress: 6157597total: 6159972: 100% test12.js:40
onprogress: 6681885total: 6159972: 108% test12.js:40
onprogress: 6158075total: 6159972: 100% test12.js:40
onprogress: 6682363total: 6159972: 108% test12.js:40
onprogress: 6158553total: 6159972: 100% test12.js:40
onprogress: 6682841total: 6159972: 108% test12.js:40
onprogress: 6159026total: 6159972: 100% test12.js:40
onprogress: 6683314total: 6159972: 108% test12.js:40
onprogress: 6159503total: 6159972: 100% test12.js:40
onprogress: 6683791total: 6159972: 109% test12.js:40
Importing Zip - Complete!

The problem seem like uncompressed size and total size is compressed... there is an issue, but that does not fix it.

from zip.js.

webmutation avatar webmutation commented on May 22, 2024

I did a second test and it appear to fix the issue, my apologies. It was probably cached... there are however multiple callbacks for the same file, haven't' found a workaround for that yet:

Unzip FILE: page0001_i1.jpg zip-fs.js:235
onprogress: 59964 Total: 6585296: 1 % fs-lib.js:53
Unzip FILE: page0001_i1.jpg zip-fs.js:235
onprogress: 59964 Total: 6585296: 1 % fs-lib.js:53
Unzip CHILD: page0001_i1.jpg zip-fs.js:213
Unzip FILE: page0001_i2.jpg zip-fs.js:235
onprogress: 86247 Total: 6585296: 1 % fs-lib.js:53
Unzip FILE: page0001_i2.jpg zip-fs.js:235
onprogress: 86247 Total: 6585296: 1 % fs-lib.js:53
Unzip CHILD: page0001_i2.jpg zip-fs.js:213
Unzip FILE: page0002_i1.jpg zip-fs.js:235
onprogress: 145455 Total: 6585296: 2 % fs-lib.js:53
Unzip FILE: page0002_i1.jpg zip-fs.js:235
onprogress: 145455 Total: 6585296: 2 % fs-lib.js:53
Unzip CHILD: page0002_i1.jpg zip-fs.js:213
Unzip FILE: page0002_i2.jpg zip-fs.js:235
onprogress: 191103 Total: 6585296: 3 % fs-lib.js:53
Unzip FILE: page0002_i2.jpg zip-fs.js:235
onprogress: 191103 Total: 6585296: 3 % fs-lib.js:53
Unzip CHILD: page0002_i2.jpg zip-fs.js:213
Unzip FILE: page0003_i1.jpg zip-fs.js:235
onprogress: 294790 Total: 6585296: 4 % fs-lib.js:53
Unzip FILE: page0003_i1.jpg zip-fs.js:235
onprogress: 294790 Total: 6585296: 4 % fs-lib.js:53
Unzip CHILD: page0003_i1.jpg zip-fs.js:213
Unzip FILE: page0003_i2.jpg zip-fs.js:235
onprogress: 339720 Total: 6585296: 5 % fs-lib.js:53
Unzip FILE: page0003_i2.jpg zip-fs.js:235
onprogress: 339720 Total: 6585296: 5 % fs-lib.js:53
Unzip CHILD: page0003_i2.jpg zip-fs.js:213
Unzip FILE: page0004_i1.jpg zip-fs.js:235
onprogress: 445176 Total: 6585296: 7 % fs-lib.js:53
Unzip FILE: page0004_i1.jpg zip-fs.js:235
onprogress: 445176 Total: 6585296: 7 % fs-lib.js:53
Unzip CHILD: page0004_i1.jpg

from zip.js.

gildas-lormeau avatar gildas-lormeau commented on May 22, 2024

Hi,

Thanks for filling the issue

I'm really sorry but I can't work on zip.js issues currently. I hope I'll find some free time in one week or two...

from zip.js.

danielweck avatar danielweck commented on May 22, 2024

@gregpsycle removing + index works for me too.
Note that onprogress(currentIndex + index, totalSize); is wrong for the export function too (in the same file zip-fs.js)

from zip.js.

Rob--W avatar Rob--W commented on May 22, 2024

@danielweck / @gregpsycle Patches are welcome ;)

from zip.js.

gildas-lormeau avatar gildas-lormeau commented on May 22, 2024

I was able to reproduce the issue, it should be fixed now.

from zip.js.

danielweck avatar danielweck commented on May 22, 2024

2013 ... how time passes :)

from zip.js.

gildas-lormeau avatar gildas-lormeau commented on May 22, 2024

You bet! :)

from zip.js.

Related Issues (20)

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.