Skip to content

Commit 2e317c9

Browse files
committed
explain extra compression fields
1 parent 1b1be65 commit 2e317c9

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

savejson.m

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,17 @@
6868
% opt.SaveBinary [0|1]: 1 - save the JSON file in binary mode; 0 - text mode.
6969
% opt.Compact [0|1]: 1- out compact JSON format (remove all newlines and tabs)
7070
% opt.Compression 'zlib' or 'gzip': specify array compression
71-
% method; currently only support 'gzip' or 'zlib'.
72-
% opt.CompressArraySize [100|int]: only compress arrays with a total
73-
% element count larger than this number.
71+
% method; currently only support 'gzip' or 'zlib'. The
72+
% data compression only applies to numerical arrays when
73+
% ArrayToStruct is 1. The compressed array use two extra
74+
% fields "_ArrayCompressionSize_" and "_ArrayCompressedData_"
75+
% where the former is a 1D interger array to store the
76+
% pre-compressed (but post-processed) array dimensions, and
77+
% the latter stores the "base64" encoded compressed binary
78+
% array data. In addition, an extra field
79+
% "_ArrayCompressionMethod_" stores the opt.Compression value.
80+
% opt.CompressArraySize [100|int]: only to compress an array if the total
81+
% element count is larger than this number.
7482
% opt can be replaced by a list of ('param',value) pairs. The param
7583
% string is equivallent to a field in opt and is case sensitive.
7684
% output:

0 commit comments

Comments
 (0)