Skip to content

Commit 07c0775

Browse files
committed
Recognize zlib format and show it in alert
1 parent e149c77 commit 07c0775

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

scripts/JSRootIOEvolution.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,14 @@
154154
return null;
155155
}
156156

157+
var fmt = "uncknown";
158+
if (getChar(curr) == 'Z' && getChar(curr+1) == 'L' && getCode(curr+2) == JSROOT.IO.Z_DEFLATED) fmt = "new"; else
159+
if (getChar(curr) == 'C' && getChar(curr+1) == 'S' && getCode(curr+2) == JSROOT.IO.Z_DEFLATED) fmt = "old"; else
160+
if (getChar(curr) == 'X' && getChar(curr+1) == 'Z') fmt = "LZMA";
161+
157162
/* C H E C K H E A D E R */
158-
if (!((getChar(curr) == 'Z' && getChar(curr+1) == 'L' && getCode(curr+2) == JSROOT.IO.Z_DEFLATED))) {
159-
if (!noalert) alert("R__unzip: Old zlib format is not supported!");
163+
if (fmt !== "new") {
164+
if (!noalert) alert("R__unzip: " + fmt + " zlib format is not supported!");
160165
return null;
161166
}
162167

0 commit comments

Comments
 (0)