function getTextStream(object) {
  // text stream objects have 4 items
  // first item is a string containing the Length of the stream
  // second item 'stream'
  // third item is the stream content Buffer
  // fourth item is 'endstream'

  if (object.items.length !== 4) {
    return;
  }
  if (typeof object.items[0] !== 'string') {
    return;
  }
  if (object.items[1] !== 'stream') {
    return;
  }
  if (!(object.items[2] instanceof Buffer)) {
    return;
  }
  if (!/endstream/.test(object.items[3])) {
    return;
  }

  return parseTextStream(object.items[2]);
}
@param {PDFDataObject} object
@return {TextStream | undefined}