Skip to content

Commit

Permalink
update zmat test to support zmat v0.8 mox-the-fox
Browse files Browse the repository at this point in the history
  • Loading branch information
fangq committed Jul 11, 2019
1 parent 6a4821c commit 06d33aa
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion base64decode.m
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
if(nargin==0)
error('you must provide at least 1 input');
end
if(exist('zmat')==3)
if(exist('zmat')==2 || exist('zmat')==3)
output=zmat(uint8(input),0,'base64');
return;
end
Expand Down
2 changes: 1 addition & 1 deletion base64encode.m
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
if(nargin==0)
error('you must provide at least 1 input');
end
if(exist('zmat')==3)
if(exist('zmat')==2 || exist('zmat')==3)
output=zmat(uint8(input),1,'base64');
return;
end
Expand Down
2 changes: 1 addition & 1 deletion gzipdecode.m
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
if(nargin==0)
error('you must provide at least 1 input');
end
if(exist('zmat')==3)
if(exist('zmat')==2 || exist('zmat')==3)
output=zmat(uint8(input),0,'gzip');
return;
end
Expand Down
2 changes: 1 addition & 1 deletion gzipencode.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
if(nargin==0)
error('you must provide at least 1 input');
end
if(exist('zmat')==3)
if(exist('zmat')==2 || exist('zmat')==3)
output=zmat(uint8(input),1,'gzip');
return;
end
Expand Down
2 changes: 1 addition & 1 deletion lzipdecode.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
if(nargin==0)
error('you must provide at least 1 input');
end
if(exist('zmat')==3)
if(exist('zmat')==2 || exist('zmat')==3)
output=zmat(uint8(input),0,'lzip');
return;
else
Expand Down
2 changes: 1 addition & 1 deletion lzipencode.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
if(nargin==0)
error('you must provide at least 1 input');
end
if(exist('zmat')==3)
if(exist('zmat')==2 || exist('zmat')==3)
output=zmat(uint8(input),1,'lzip');
return;
else
Expand Down
2 changes: 1 addition & 1 deletion lzmadecode.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
if(nargin==0)
error('you must provide at least 1 input');
end
if(exist('zmat')==3)
if(exist('zmat')==2 || exist('zmat')==3)
output=zmat(uint8(input),0,'lzma');
return;
else
Expand Down
2 changes: 1 addition & 1 deletion lzmaencode.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
if(nargin==0)
error('you must provide at least 1 input');
end
if(exist('zmat')==3)
if(exist('zmat')==2 || exist('zmat')==3)
output=zmat(uint8(input),1,'lzma');
return;
else
Expand Down
2 changes: 1 addition & 1 deletion savejson.m
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
if(isempty(strmatch(dozip,{'zlib','gzip','lzma','lzip'})))
error('compression method "%s" is not supported',dozip);
end
if(exist('zmat')~=3)
if(exist('zmat')~=2 && exist('zmat')~=3)
try
error(javachk('jvm'));
try
Expand Down
2 changes: 1 addition & 1 deletion saveubjson.m
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
if(isempty(strmatch(dozip,{'zlib','gzip','lzma','lzip'})))
error('compression method "%s" is not supported',dozip);
end
if(exist('zmat')~=3)
if(exist('zmat')~=2 && exist('zmat')~=3)
try
error(javachk('jvm'));
try
Expand Down
2 changes: 1 addition & 1 deletion zlibdecode.m
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
if(nargin==0)
error('you must provide at least 1 input');
end
if(exist('zmat')==3)
if(exist('zmat')==2 || exist('zmat')==3)
output=zmat(uint8(input),0,'zlib');
return;
end
Expand Down
2 changes: 1 addition & 1 deletion zlibencode.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
if(nargin==0)
error('you must provide at least 1 input');
end
if(exist('zmat')==3)
if(exist('zmat')==2 || exist('zmat')==3)
output=zmat(input,1,'zlib');
return;
end
Expand Down

0 comments on commit 06d33aa

Please sign in to comment.