_parseMetadata(remainingChunk) {
        let remainingPlusStoredMetadata = remainingChunk;
        // have metadata pieces so need to add to the front of
        // remainingChunk
        if (this.currentMetadata.length > 0) {
            this.currentMetadata.push(remainingChunk);
            remainingPlusStoredMetadata = Buffer.concat(this.currentMetadata);
            // zero out stored metadata
            this.currentMetadata.length = 0;
        }
        let lineBreakIndex = remainingPlusStoredMetadata.indexOf('\r\n');
        if (lineBreakIndex < 0) {
            this.currentMetadata.push(remainingPlusStoredMetadata);
            return { completeMetadata: false };
        }
        let fullMetadata = remainingPlusStoredMetadata.slice(0,
            lineBreakIndex);

        // handle extra line break on end of data chunk
        if (fullMetadata.length === 0) {
            const chunkWithoutLeadingLineBreak = remainingPlusStoredMetadata
                .slice(2);
            // find second line break
            lineBreakIndex = chunkWithoutLeadingLineBreak.indexOf('\r\n');
            if (lineBreakIndex < 0) {
                this.currentMetadata.push(chunkWithoutLeadingLineBreak);
                return { completeMetadata: false };
            }
            fullMetadata = chunkWithoutLeadingLineBreak.slice(0,
                lineBreakIndex);
        }

        const splitMeta = fullMetadata.toString().split(';');
        this.log.trace('parsed full metadata for chunk', { splitMeta });
        if (splitMeta.length !== 2) {
            this.log.trace('chunk body did not contain correct ' +
            'metadata format');
            return { err: errors.InvalidArgument };
        }
        let dataSize = splitMeta[0];
        // chunk-size is sent in hex
        dataSize = Number.parseInt(dataSize, 16);
        if (Number.isNaN(dataSize)) {
            this.log.trace('chunk body did not contain valid size');
            return { err: errors.InvalidArgument };
        }
        let chunkSig = splitMeta[1];
        if (!chunkSig || chunkSig.indexOf('chunk-signature=') < 0) {
            this.log.trace('chunk body did not contain correct sig format');
            return { err: errors.InvalidArgument };
        }
        chunkSig = chunkSig.replace('chunk-signature=', '');
        this.currentSignature = chunkSig;
        this.haveMetadata = true;
        if (dataSize === 0) {
            this.lastChunk = true;
            return {
                completeMetadata: true,
            };
        }
        // + 2 to get \r\n at end
        this.seekingDataSize = dataSize + 2;
        this.currentData = Buffer.alloc(dataSize);

        return {
            completeMetadata: true,
            // start slice at lineBreak plus 2 to remove line break at end of
            // metadata piece since length of '\r\n' is 2
            unparsedChunk: remainingPlusStoredMetadata
                .slice(lineBreakIndex + 2),
        };
    }
This function will parse the metadata portion of the chunk
@param {Buffer} remainingChunk - chunk sent from _transform
@return {object} response - if error, will return 'err' key with
arsenal error value.
if incomplete metadata, will return 'completeMetadata' key with
value false
if complete metadata received, will return 'completeMetadata' key with
value true and the key 'unparsedChunk' with the remaining chunk without
the parsed metadata piece