in java/src/main/java/com/epam/deltix/zstd/BitStream.java [37:56]
static long readTail(final ByteBuffer inputBase, final int inputAddress, final int inputSize) {
long bits = inputBase.get(inputAddress) & 0xFF;
switch (inputSize) {
case 7:
bits |= (inputBase.get(inputAddress + 6) & 0xFFL) << 48;
case 6:
bits |= (inputBase.get(inputAddress + 5) & 0xFFL) << 40;
case 5:
bits |= (inputBase.get(inputAddress + 4) & 0xFFL) << 32;
case 4:
bits |= (inputBase.get(inputAddress + 3) & 0xFFL) << 24;
case 3:
bits |= (inputBase.get(inputAddress + 2) & 0xFFL) << 16;
case 2:
bits |= (inputBase.get(inputAddress + 1) & 0xFFL) << 8;
}
return bits;
}