diff --git a/base64decode.m b/base64decode.m index 2580c78..5e69a7d 100644 --- a/base64decode.m +++ b/base64decode.m @@ -14,7 +14,9 @@ % License : BSD, see LICENSE_*.txt % -error(nargchk(1, 1, nargin)); +if(nargin==0) + error('you must provide at least 1 input'); +end error(javachk('jvm')); if ischar(input), input = uint8(input); end diff --git a/base64encode.m b/base64encode.m index 3fa27f8..205bc2d 100644 --- a/base64encode.m +++ b/base64encode.m @@ -14,10 +14,12 @@ % License : BSD, see LICENSE_*.txt % -error(nargchk(1, 1, nargin)); +if(nargin==0) + error('you must provide at least 1 input'); +end error(javachk('jvm')); if ischar(input), input = uint8(input); end output = char(org.apache.commons.codec.binary.Base64.encodeBase64Chunked(input))'; - +output = regexprep(output,'\r',''); end diff --git a/gzipdecode.m b/gzipdecode.m index 0baf388..cb02ee2 100644 --- a/gzipdecode.m +++ b/gzipdecode.m @@ -14,7 +14,9 @@ % License : BSD, see LICENSE_*.txt % -error(nargchk(1, 1, nargin)); +if(nargin==0) + error('you must provide at least 1 input'); +end error(javachk('jvm')); if ischar(input) warning('gzipdecode:inputTypeMismatch', ... diff --git a/gzipencode.m b/gzipencode.m index 415f04a..39fed96 100644 --- a/gzipencode.m +++ b/gzipencode.m @@ -15,7 +15,9 @@ % License : BSD, see LICENSE_*.txt % -error(nargchk(1, 1, nargin)); +if(nargin==0) + error('you must provide at least 1 input'); +end error(javachk('jvm')); if ischar(input), input = uint8(input); end if ~isa(input, 'int8') && ~isa(input, 'uint8') diff --git a/zlibdecode.m b/zlibdecode.m index 47202af..c85dbff 100644 --- a/zlibdecode.m +++ b/zlibdecode.m @@ -14,7 +14,9 @@ % License : BSD, see LICENSE_*.txt % -error(nargchk(1, 1, nargin)); +if(nargin==0) + error('you must provide at least 1 input'); +end error(javachk('jvm')); if ischar(input) warning('zlibdecode:inputTypeMismatch', ... diff --git a/zlibencode.m b/zlibencode.m index 0999279..adaaf23 100644 --- a/zlibencode.m +++ b/zlibencode.m @@ -16,7 +16,9 @@ % -error(nargchk(1, 1, nargin)); +if(nargin==0) + error('you must provide at least 1 input'); +end error(javachk('jvm')); if ischar(input), input = uint8(input); end if ~isa(input, 'int8') && ~isa(input, 'uint8')