fixed some problems and added the demos for fxhelloworld, fxbasicexample and fxchompies

This commit is contained in:
ZennDev1337 2023-10-06 15:21:04 +02:00
parent 9ad03927de
commit 4a3100c0bd
18 changed files with 258 additions and 85 deletions

View file

@ -833,7 +833,6 @@
name = name || blob.name || 'download';
a.download = name;
a.rel = 'noopener'; // tabnabbing
// TODO: detect chrome extensions & packaged apps
// a.target = '_blank'
if (typeof blob === 'string') {
@ -1311,7 +1310,6 @@ https://github.com/nodeca/pako/blob/main/LICENSE
/**
* Create the _pako object.
* TODO: lazy-loading this object isn't the best solution but it's the
* quickest. The best solution is to lazy-load the worker list. See also the
* issue #446.
*/
@ -1575,7 +1573,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
decToHex(encodedComment.length, 2) +
// disk number start
"\x00\x00" +
// internal file attributes TODO
// internal file attributes
"\x00\x00" +
// external file attributes
decToHex(extFileAttr, 4) +
@ -1982,7 +1980,6 @@ https://github.com/nodeca/pako/blob/main/LICENSE
JSZip.support = require("./support");
JSZip.defaults = require("./defaults");
// TODO find a better way to handle this version,
// a require('package.json').version doesn't work with webpack, see #327
JSZip.version = "3.10.1";
@ -2352,7 +2349,6 @@ https://github.com/nodeca/pako/blob/main/LICENSE
var object = new ZipObject(name, zipObjectContent, o);
this.files[name] = object;
/*
TODO: we can't throw an exception because we have async promises
(we can have a promise of a Date() for example) but returning a
promise is useless because file(name, data) returns the JSZip
object for chaining. Should we break that to allow the user
@ -2450,7 +2446,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
file = this.files[filename];
relativePath = filename.slice(this.root.length, filename.length);
if (relativePath && filename.slice(0, this.root.length) === this.root) { // the file is in the current root
cb(relativePath, file); // TODO reverse the parameters ? need to be clean AND consistent with the filter search fn...
cb(relativePath, file); // reverse the parameters ? need to be clean AND consistent with the filter search fn...
}
}
},
@ -3053,7 +3049,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
var GenericWorker = require("./GenericWorker");
// the size of the generated chunks
// TODO expose this as a public variable
// expose this as a public variable
var DEFAULT_BLOCK_SIZE = 16 * 1024;
/**
@ -4129,14 +4125,14 @@ https://github.com/nodeca/pako/blob/main/LICENSE
function arrayLikeToString(array) {
// Performances notes :
// --------------------
// String.fromCharCode.apply(null, array) is the fastest, see
// String.fromCharCode.apply(null, array) is the fastest
// see http://jsperf.com/converting-a-uint8array-to-a-string/2
// but the stack is limited (and we can get huge arrays !).
//
// result += String.fromCharCode(array[i]); generate too many strings !
//
// This code is inspired by http://jsperf.com/arraybuffer-to-string-apply-performance/2
// TODO : we now have workers that split the work. Do we still need that ?
// we now have workers that split the work. Do we still need that ?
var chunk = 65536,
type = exports.getTypeOf(array),
canUseApply = true;
@ -9230,7 +9226,6 @@ https://github.com/nodeca/pako/blob/main/LICENSE
this.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */
this.check = 0; /* protected copy of check value */
this.total = 0; /* protected copy of output count */
// TODO: may be {}
this.head = null; /* where to save gzip header information */
/* sliding window */
@ -9762,7 +9757,6 @@ https://github.com/nodeca/pako/blob/main/LICENSE
if (have === 0) { break inf_leave; }
copy = 0;
do {
// TODO: 2 or 1 bytes?
len = input[next + copy++];
/* use constant limit because in js we should not preallocate memory */
if (state.head && len &&

View file

@ -7,7 +7,7 @@
href="https://upload.wikimedia.org/wikipedia/commons/0/0f/Original_Ferris.svg"
type="image/svg+xml"
/>
<title>ZennDev1337 Image Converter</title>
<title>ZennDev1337 fxdata.h Converter</title>
</head>
<body onload="setup(this);">