presto-orc/src/main/java/io/prestosql/orc/stream/LongBitPacker.java/LongBitPacker/unpack4
class LongBitPacker:    private void unpack4(long[] buffer, int offset, int len, InputStream input)
            throws IOException
    {
        if (len != 0 && len < 3) {
            int value = input.read();
            buffer[offset] = (0b1111_0000 & value) >>> 4;
            if (len == 2) {
                buffer[offset + 1] = 0b0000_1111 & value;
            }
            return;
        }

        int blockReadableBytes = (4 * len + 7) / 8;
        for (int i = 0; i < blockReadableBytes; ) {
            i += input.read(tmp, i, blockReadableBytes - i);
        }
        int outputIndex = offset;
        int end = offset + len;
        int tmpIndex = 0;
        for (; outputIndex + 1 < end; outputIndex += 2) {
            long value;
            value = tmp[tmpIndex];
            tmpIndex++;
            buffer[outputIndex] = (0b1111_0000 & value) >>> 4;
            buffer[outputIndex + 1] = 0b0000_1111 & value;
        }

        // Get the last byte and decode it, if necessary
        if (outputIndex != end) {
            buffer[outputIndex] = (0b1111_0000 & tmp[blockReadableBytes - 1]) >>> 4;
        }
    }