Prepares 'this' for writing. Can be called several times, e.g. PrestoSerializer resets these. The memory formerly backing 'ranges_' is not owned and the caller needs to recycle or free this independently.
| 283 | /// 'ranges_' is not owned and the caller needs to recycle or free |
| 284 | /// this independently. |
| 285 | void startWrite(int32_t initialSize) { |
| 286 | ranges_.clear(); |
| 287 | isReversed_ = false; |
| 288 | allocatedBytes_ = 0; |
| 289 | current_ = nullptr; |
| 290 | lastRangeEnd_ = 0; |
| 291 | extend(initialSize); |
| 292 | } |
| 293 | |
| 294 | void seek(int32_t range, int32_t position) { |
| 295 | current_ = &ranges_[range]; |
no test coverage detected