#======================================================================================================
#===========================[ENV] No need to change unless necessary. =================================
#======================================================================================================
[ENV]
#endianType: either LITTLE_ENDIAN_DATA or BIG_ENDIAN_DATA
#x86, x64 and arm adopt LITTLE_ENDIAN_DATA
#PowerPC (PPC), MAC OS, and KEIL C51 adopt BIG_ENDIAN_DATA
#dataEndianType = BIG_ENDIAN_DATA
dataEndianType = LITTLE_ENDIAN_DATA

#solution: SZ, .....
sol_name = SZ


#======================================================================================================
#=================[Compression Parameters] No need to change unless necessary. =======================
#======================================================================================================
[PARAMETER]
#sampleDistance determins the number of samples used to optimize the # quantization intervals
#For example, sampleDistance=50 means 1/50=2% of data points are sample points.
#sampleDistance = 100
sampleDistance = 100

#The number of quantization intervals should be always set to an "even" number!
#If it is set to 0, SZ will autamatically search for an optimized setting.
#Otherwise, it has be to no less than 4 and no greater than 65536, such as 256.
quantization_intervals = 0

#maximum quantization interval is valid only when quantization_intervals=0 (i.e., let the sz compressor optimize the intervals)
#In general, this setting does not change the compression ratio/rate, but only affect the compression speed to a certain extent (only 10% in general).
#The high values of max_quant_intervals, the lower compression speed, but the higher ability the compressor can reach high compression ratios for high-precision compression.
#As for low-precision compression (i.e., high error bound such as 1E-2), max_quant_intervals could be set to 256 or 65536.
#As for pretty-high-precision demand (i.e., fairly small error bound such as 1E-6), max_quant_intervals could be set to 2097152(=2^21).
#max_quant_intervals = 4194304
#max_quant_intervals = 262144
max_quant_intervals = 65536
#max_quant_intervals = 128

#predThreshold: the threshold to determine the ratio of predictable data over all data
#predThreshold = 0.97 means 97% of data will be predictable
predThreshold = 0.99

#SZ_Mode
#two options: SZ_BEST_SPEED or SZ_BEST_COMPRESSION
#szMode = SZ_BEST_COMPRESSION
szMode = SZ_BEST_SPEED

#Select the lossless compression techniques after the lossy compression: either ZSTD_COMPRESSOR or GZIP_COMPRSSOR
losslessCompressor = ZSTD_COMPRESSOR
#losslessCompressor = GZIP_COMPRESSOR

#GZIP_Mode (only valid when losslessCompressor is GZIP_COMPRESSOR)
#Note: this parameter setting is valid only if szMode = SZ_BEST_COMPRESION.
#
#If losslessCompressor = GZIP_COMPRESSOR, there are four options: Gzip_NO_COMPRESSION, or Gzip_BEST_SPEED, Gzip_BEST_COMPRESSION, Gzip_DEFAULT_COMPRESSION
gzipMode = Gzip_BEST_SPEED
#gzipMode = Gzip_BEST_COMPRESSION


#ZSTD_Mode (only valid when losslessCompressor is GZIP_COMPRESSOR or ZSTD_COMPRESSOR)
#If losslessCompressor = ZSTD_COMPRESSOR, there are five options: Zstd_BEST_SPEED, Zstd_HIGH_SPEED, Zstd_HIGH_COMPRESSION, Zstd_BEST_COMPRESSION and Zstd_DEFAULT_COMPRESSION. 
#(Their levels are 1, 3, 19, 22, 3, respectively.)
zstdMode = Zstd_HIGH_SPEED

#======================================================================================================
#========[User Parameters] The following parameters are better to be changed on demand. ===============
#======================================================================================================

#errorBoundMode: 8 options to control different types of error bounds (detailed can be found in the user guide)
#ABS_AND_REL, ABS_OR_REL, ABS, REL, PW_REL, ABS_AND_PW_REL, ABS_OR_PW_REL, REL_AND_PW_REL, REL_OR_PW_REL
#errorBoundMode = ABS_AND_PW_REL
#errorBoundMode = PW_REL
#errorBoundMode = PSNR
#errorBoundMode = ABS
errorBoundMode = REL

#absolute Error Bound (NOTE: it's valid when errorBoundMode is related to ABS (i.e., absolute error bound)
#absErrBound is to limit the (de)compression errors to be within an absolute error. For example, absErrBound=0.0001 means the decompressed value must be in [V-0.0001,V+0.0001], where V is the original true value.
#absErrBound = 1E-4
#absErrBound = 0.0000000001
#absErrBound = 1E-3
absErrBound = 1E-3

#relative Bound Ratio (NOTE: it's valid only when errorBoundMode is related to REL (i.e., value_range based relative error bound)
#relErrBound is to limit the (de)compression errors by considering the global data value range size (i.e., taking into account the range size (max_value - min_value)).
#For example, suppose relBoundRatio is set to 0.01, and the data set is {100,101,102,103,104,...,110}, so the global value range size is 110-100=10, so the error bound will actually be 10*0.01=0.1, from the perspective of "relBoundRatio"
relBoundRatio = 1E-3

#expected PSNR (Note: only valid when errorBoundMode = PSNR)
#psnr is to spesify the PSNR of the compression. It's valid only when errorBoundMode == PSNR
psnr = 80

#point-wise relative Bound Ratio (NOTE: only valid when errorBoundMode is related to PW_REL)
#pw_relBountRatio is to limit the (de)compression errors by considering the point-wise original data values.
#For example, suppose pw_relBoundRatio is set to 0.01, and the data set is {100,101,102,103,104,...,110}, so the compression errors will be limited to {1,1.01,1.02,....1.10} for the data points.
#Only valid when errorBoundMode = PW_REL
pw_relBoundRatio = 1E-2
