def getk_response_from_buffer(buf)
          # There's no header in the buffer, so don't advance
          return [0, nil, nil, nil, nil] unless contains_header?(buf)

          resp_header = response_header_from_buffer(buf)
          body_len = resp_header.body_len

          # We have a complete response that has no body.
          # This is either the response to the terminating
          # noop or, if the status is not zero, an intermediate
          # error response that needs to be discarded.
          return [ResponseHeader::SIZE, resp_header.ok?, resp_header.cas, nil, nil] if body_len.zero?

          resp_size = ResponseHeader::SIZE + body_len
          # The header is in the buffer, but the body is not.  As we don't have
          # a complete response, don't advance the buffer
          return [0, nil, nil, nil, nil] unless buf.bytesize >= resp_size

          # The full response is in our buffer, so parse it and return
          # the values
          body = buf.byteslice(ResponseHeader::SIZE, body_len)
          key, value = unpack_response_body(resp_header, body, true)
          [resp_size, resp_header.ok?, resp_header.cas, key, value]
        end
#
This method returns an array of values used in a pipelined
getk process.  The first value is the number of bytes by
which to advance the pointer in the buffer.  If the
complete response is found in the buffer, this will
be the response size.  Otherwise it is zero.

The remaining three values in the array are the ResponseHeader,
key, and value.
#