_transform(chunkInput, encoding, callback) {
        let chunk = chunkInput;
        while (chunk.byteLength > 0 && !this.streamClosed) {
            if (this.bytesToDiscard > 0) {
                const toDiscard = Math.min(this.bytesToDiscard, chunk.byteLength);
                chunk = chunk.subarray(toDiscard);
                this.bytesToDiscard -= toDiscard;
                continue;
            }
            // forward up to bytesToRead bytes from the chunk, restart processing on leftover
            if (this.bytesToRead > 0) {
                const toRead = Math.min(this.bytesToRead, chunk.byteLength);
                this.push(chunk.subarray(0, toRead));
                chunk = chunk.subarray(toRead);
                this.bytesToRead -= toRead;
                if (this.bytesToRead === 0) {
                    this.bytesToDiscard = 2;
                }
                continue;
            }

            // we are now looking for the chunk size field
            // no need to look further than 10 bytes since the field cannot be bigger: the max
            // chunk size is 5GB (see constants.maximumAllowedPartSize)
            const lineBreakIndex = chunk.subarray(0, 10).indexOf('\r');
            const bytesToKeep = lineBreakIndex === -1 ? chunk.byteLength : lineBreakIndex;
            if (this.chunkSizeBuffer.byteLength + bytesToKeep > 10) {
                this.log.error('chunk size field too big', {
                    chunkSizeBuffer: this.chunkSizeBuffer.subarray(0, 11).toString('hex'),
                    chunkSizeBufferLength: this.chunkSizeBuffer.length,
                    truncatedChunk: chunk.subarray(0, 10).toString('hex'),
                });
                // if bigger, the chunk would be over 5 GB
                // returning early to avoid a DoS by memory exhaustion
                return callback(errors.InvalidArgument);
            }
            if (lineBreakIndex === -1) {
                // no delimiter, we'll keep the chunk for later
                this.chunkSizeBuffer = Buffer.concat([this.chunkSizeBuffer, chunk]);
                return callback();
            }

            this.chunkSizeBuffer = Buffer.concat([this.chunkSizeBuffer, chunk.subarray(0, lineBreakIndex)]);
            chunk = chunk.subarray(lineBreakIndex);

            // chunk-size is sent in hex
            const chunkSizeStr = this.chunkSizeBuffer.toString();
            const dataSize = parseInt(chunkSizeStr, 16);
            // we check that the parsing is correct (parseInt returns a partial parse when it fails)
            if (isNaN(dataSize) || dataSize.toString(16) !== chunkSizeStr.toLowerCase()) {
                this.log.error('invalid chunk size', { chunkSizeBuffer: chunkSizeStr });
                return callback(errors.InvalidArgument);
            }
            this.chunkSizeBuffer = Buffer.alloc(0);
            if (dataSize === 0) {
                // TODO: check if the checksum is correct (S3C-9732)
                // last chunk, no more data to read, the stream is closed
                this.streamClosed = true;
            }
            if (dataSize > maximumAllowedPartSize) {
                this.log.error('chunk size too big', { dataSize });
                return callback(errors.EntityTooLarge);
            }
            this.bytesToRead = dataSize;
            this.bytesToDiscard = 2;
        }

        return callback();
    }
This function will remove the trailing checksum from the stream

@param {Buffer} chunkInput - chunk from request body
@param {string} encoding - Data encoding
@param {function} callback - Callback(err, justDataChunk, encoding)
@return {function} executes callback with err if applicable