Since we only allocate 4 bits and char is signed, the usable space
was -8..7. Larger values (like, say, 12) overflow, and get interpreted
as a negative value, which means they don't act as a filter, since all
zoom values are natural numbers.
The tests didn't actually test that a zoom value could be roundtripped.
I updated them, and verified they failed before the code change, and
passed after the code change.
I've also allocated an extra bit so that we support minzooms up to z31,
vs just up to z15, since I think (?) some people generate up to z16
Fixes #671
Since we only allocate 4 bits and
char
is signed, the usable space was -8..7. Larger values (like, say, 12) overflow, and get interpreted as a negative value, which means they don't act as a filter, since all zoom values are natural numbers.The tests didn't actually test that a zoom value could be roundtripped. I updated them, and verified they failed before the code change, and passed after the code change.
I've also allocated an extra bit so that we support minzooms up to z31, vs just up to z15, since I think (?) some people generate up to z16