public static long decodeGolombL(final InputStream in, final long m, final int logm)
throws IOException {
final BitInputStream bis = new BitInputStream(in);
long unary = 0;
while(!bis.readBit()) {// loop until '1' is found
unary++;
}
/* Get the first q bits (we may need (q+1) actually) */
long remainder = BitUtils.getLongBits(bis, logm);