var limit: Int

Write position limit. No bytes could be written ahead of this limit. When the limit is less than the capacity then this means that there are reserved bytes in the end (endGap). Such a reserved space in the end could be used to write size, hash and so on. Also it is useful when several buffers are connected into a chain and some primitive value (e.g. kotlin.Int) is separated into two chunks so bytes from the second chain could be copied to the reserved space of the first chunk and then the whole value could be read at once.