public static BD fromByte(byte bd) {
            int reserved2 = (bd >>> 0) & 15;
            int blockMaximumSize = (bd >>> 4) & 7;
            int reserved3 = (bd >>> 7) & 1;

            return new BD(reserved2, blockMaximumSize, reserved3);
        }
A simple state check to ensure the stream is still open.
clients/src/main/java/org/apache/kafka/common/compress/Lz4BlockOutputStream.java