code: function check_bounds(buf, offset, len) {
      if (offset < 0 || offset + len > buf.length) {
          throw new RangeError("Index out of range");
      }
  }
docs: Check that something is within the Buffer bounds