void processFrame(final byte[] b) {
            int start = 0;
            int i = 0;
            while (i < b.length) {
                switch (b[i]) {
                    case '\n':
                        buffer.write(b, start, i + 1 - start);
                        start = i + 1;
                        consume();
                        lastCR = false;
                        break;
                    case '\r':
                        if (lastCR) {
                            consume();
                        }
                        buffer.write(b, start, i + 1 - start);
                        start = i + 1;
                        lastCR = true;
                        break;
                    default:
                        if (lastCR) {
                            consume();
                        }
                        lastCR = false;
                }
                i++;
            }
            buffer.write(b, start, b.length - start);
        }
@return a {@link CountDownLatch} that may be used to wait until {@link #close()} has been called.
core/src/main/java/org/testcontainers/containers/output/FrameConsumerResultCallback.java