From 3ff781f3bea71f8eb129523ea2a724f22f1ecfb1 Mon Sep 17 00:00:00 2001 From: Qianqian Fang Date: Tue, 7 Nov 2023 22:44:46 -0500 Subject: [PATCH] make octavezmat work on matlab --- DESCRIPTION | 2 +- INDEX | 4 ++++ octavezmat.m | 6 +++++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index df2790d..f763420 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Name: jsonlab Version: 2.9.8 -Date: 2022-29-04 +Date: 2023-11-11 Title: A JSON/UBJSON/MessagePack encoder/decoder for MATLAB/Octave Author: Qianqian Fang Maintainer: Qianqian Fang diff --git a/INDEX b/INDEX index f18fd9a..883c329 100644 --- a/INDEX +++ b/INDEX @@ -25,6 +25,8 @@ JSON Mmap Compression and Decompression base64decode base64encode + blosc2decode + blosc2encode gzipdecode gzipencode lz4decode @@ -37,6 +39,8 @@ Compression and Decompression lzmaencode zlibdecode zlibencode + zstddecode + zstdencode octavezmat Helper Functions decodevarname diff --git a/octavezmat.m b/octavezmat.m index 5ce48ca..8dc99e8 100644 --- a/octavezmat.m +++ b/octavezmat.m @@ -117,7 +117,11 @@ if(~iscompress) if(strcmp(zipmethod, 'zlib')) outputfile=unzip(tmpfile, tempdir); - outputfile=[tempdir filesep outputfile{1}]; + if((exist('OCTAVE_VERSION','builtin')~=0)) + outputfile=[tempdir filesep outputfile{1}]; + else + outputfile = outputfile{1}; + end elseif(strcmp(zipmethod, 'gzip')) gunzip(tmpfile); end