This PR makes decoders correctly handle cases where nbit is 0.
Following two possible issues will be corrected by this PR:
Simple packing and JPEG 2000 code stream format decoders have returned $R$ for all points when nbit was 0,
although they should return $R * 10^{-D}$.
I noticed this problem when I was reading the source code of wgrib2.
Although I have went through every one of data files I had on hand,
I have not encountered any data files where the problem actually occurs,
since every message has had $D$ value of 0 when nbit is 0.
PNG format decoder may possibly have crashed when nbit was 0.
I have not encountered any data files where the problem actually occurs,
since I only have PNG-format encoded data files whose nbit is 16.
This PR makes decoders correctly handle cases where nbit is 0.
Following two possible issues will be corrected by this PR:
Simple packing and JPEG 2000 code stream format decoders have returned $R$ for all points when nbit was 0, although they should return $R * 10^{-D}$. I noticed this problem when I was reading the source code of wgrib2. Although I have went through every one of data files I had on hand, I have not encountered any data files where the problem actually occurs, since every message has had $D$ value of 0 when nbit is 0.
PNG format decoder may possibly have crashed when nbit was 0. I have not encountered any data files where the problem actually occurs, since I only have PNG-format encoded data files whose nbit is 16.