constructor(log) {
        super({});
        this.log = log;
        this.chunkSizeBuffer = Buffer.alloc(0);
        this.bytesToDiscard = 0; // when trailing \r\n are present, we discard them but they can be in different chunks
        this.bytesToRead = 0; // when a chunk is advertised, the size is put here and we forward all bytes
        this.streamClosed = false;
    }
@constructor
@param {object} log - logger object