You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+22-1Lines changed: 22 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,11 +22,12 @@ What is done
22
22
* Load progress event
23
23
* Get file as Base64
24
24
* Get file as HTML Data URI (for hide from Network Requests)
25
+
* GZIP Decompress Support, forked from jsxgraph/jsxgraph
25
26
26
27
TODO
27
28
========
28
29
* Load files from JPAK only when needed. A.K.A. - Fetch only the necessary parts from jpak file.
29
-
30
+
* Add option to compress files on packing.
30
31
31
32
How to use it
32
33
========
@@ -179,6 +180,26 @@ JPAK Loader Error Codes:
179
180
* 100->600 - HTML Status Code. Consult **RFC-2616** for details.
180
181
* 8000 - Wrong file magic
181
182
183
+
184
+
GZIP Support:
185
+
========
186
+
187
+
The GZIP Decompress support is a modified version of **zip.js** from jsxgraph/jsxgraph project. For now, the default behaviour of `jpakloader` is to check the `compressed` flag at file entry. If its true, it tryes to decompress the file.
188
+
189
+
For compatible GZIPPing a file on Python you can do:
190
+
```python
191
+
import zlib
192
+
f =open("uncompressed", "rb")
193
+
data = f.read()
194
+
f.close()
195
+
data = zlib.compress(data, 9) # Level 9 is important
196
+
f =open("compressed", "wb")
197
+
f.write(data)
198
+
f.close()
199
+
```
200
+
201
+
* TODO on Tools: Add option to compress files on packer.py
0 commit comments