private ReadBuffer getReadBuffer(byte[] data, ModbusByteOrder byteOrder) {
        switch (byteOrder) {
            case LITTLE_ENDIAN: {
                // [4, 3, 2, 1]
                // [8, 7, 6, 5, 4, 3, 2, 1]
                return new ReadBufferByteBased(data, ByteOrder.LITTLE_ENDIAN);
            }
            case BIG_ENDIAN_BYTE_SWAP: {
                // [2, 1, 4, 3]
                // [2, 1, 4, 3, 6, 5, 8, 7]
                byte[] reordered = ModbusProtocolLogic.byteSwap(data);
                return new ReadBufferByteBased(reordered, ByteOrder.BIG_ENDIAN);
            }
            case LITTLE_ENDIAN_BYTE_SWAP: {
                // [3, 4, 1, 2]
                // [7, 8, 5, 6, 3, 4, 1, 2]
                byte[] reordered = ModbusProtocolLogic.byteSwap(data);
                return new ReadBufferByteBased(reordered, ByteOrder.LITTLE_ENDIAN);
            }
            default:
                // 16909060
                // [1, 2, 3, 4]
                // 72623859790382856
                // [1, 2, 3, 4, 5, 6, 7, 8]
                return new ReadBufferByteBased(data, ByteOrder.BIG_ENDIAN);
        }
    }
When reading large chunks of data, here we need to read the parts that were originally requested.

@param readRequest original read request
@param readResponses map of the sub-requests that were executed
@return post processed response reflecting the unmodified user request items
plc4j/drivers/modbus/src/main/java/org/apache/plc4x/java/modbus/base/optimizer/ModbusOptimizer.java