The number of shifts is the number of bits that will be chopped (in the dark regions) from the initial image to fit into 8 bits.
For instance, if you have a 10 bit image, compressing into an 8 bit image will obviously introduce some losses. You can decide to loose information either in the "whithe" parts or in the "black" parts of the image.
With #shifts = 0, the two most significant bits will be lost, so the whitest parts of the image will be uniformely white, but the darl grey levels will be preserved.
With #shifts = 2, the two least significant bits will be lost, preversing the whitest parts grey variations, but losing the subtilities in the darkest parts.
With #shifts = 1, a single bit is lost on either sides...
Chilly Charly (aka CC)