B4W cannot read GZIP files created with its own module

09 August 2018 22:35
I made .gz files (of bin and json) with from the /scripts folder. The files look alright and I can open them in Windows. But when I try to run the project in the browser, the pako_inflate lib that decompresses .gz files returns:

B4W ERROR: incorrect header check (parsing gzipped file <filename>)

The passage (in pako_inflate.js) that produces the error is:
      if (!(state.wrap & 1) ||   /* check if zlib header allowed */
        (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) {
        strm.msg = 'incorrect header check';
        state.mode = BAD;

(but if I comment out that part, I get further errors ("unknown compression method", "need dictionary") down the line, so I guess this does not work at all)

P.S.: When I try it with .gz files created by another source (for example with 7-Zip), B4W returns the same error "incorrect header check".
Please register or log in to leave a reply.