szcompressor / SZ

Error-bounded Lossy Data Compressor (for floating-point/integer datasets)
http://szcompressor.org
Other
151 stars 56 forks source link

Missing parentheses in function convertBytesToSZParams #46

Closed jw447 closed 4 years ago

jw447 commented 4 years ago

It seems that in ByteToolkit.c, function convertBytesToSZParams(unsigned char bytes, sz_params params), line 963 should be

exe_params->optQuantMode = (flag1 & 0x40) >> 6;

Missing parentheses will cause incorrect optQuantMode.

disheng222 commented 4 years ago

Thanks, Jon. You are right. I just fixed it. Missing that parenthesis only causes wrong metadata in the compressed data but not affect the decompressed data or compression ratio.

Best, Sheng

On Tue, Oct 22, 2019 at 2:28 PM Jon.W notifications@github.com wrote:

It seems that in ByteToolkit.c, function convertBytesToSZParams(unsigned char bytes, sz_params params), line 963 should be

exe_params->optQuantMode = (flag1 & 0x40) >> 6;

Missing parentheses will cause incorrect optQuantMode.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/disheng222/SZ/issues/46?email_source=notifications&email_token=ACK3KSPPFLMB237Y2ANS3FTQP5H7DA5CNFSM4JDUH7QKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HTTDQOQ, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACK3KSJUCJWQ7OGB6VB5MNLQP5H7DANCNFSM4JDUH7QA .

jw447 commented 4 years ago

Thank you @disheng222 for the response.