message: added steal() to Buffer
diff: @@ -195,6 +195,21 @@ class Buffer {
  initWithNone();
  }
  + // Steal external memory; only allowed when the buffer is not local,
  + // i.e. !usesLocalMemory()
  + T* steal() noexcept {
  + VELOCYPACK_ASSERT(!usesLocalMemory());
  +
  + auto buffer = _buffer;
  + _buffer = _local;
  + _size = 0;
  + _capacity = sizeof(_local);
  + poison(_buffer, _capacity);
  + initWithNone();
  +
  + return buffer;
  + }
  +
  inline T& operator[](std::size_t position) noexcept {
  return _buffer[position];
  }
  @@ -252,6 +267,12 @@ class Buffer {
  }
  }
  + // If true, uses memory inside the buffer (_local).
  + // Otherwise, uses memory on the heap.
  + bool usesLocalMemory() const noexcept {
  + return _buffer == _local;
  + }
  +
  private:
  // initialize Buffer with a None value
  inline void initWithNone() noexcept { _buffer[0] = '\x00'; }
  