Zero-copy view over the next n bytes of the backing buffer — nocopy is made, so callers that only inspect or immediately re-read thebytes (e.g. blobbing a whole compressed records region beforebuilding the owned Bytes a decompressor needs) avoid a defensivecopy. The returned BytesView borrows self.data and stays validwhile that Bytes outlives the decoder.
Preallocate the backing array to hold roughly n bytes up front, sothe hot request/record-batch encoding paths avoid repeated arraygrowth reallocations. Growth stalls when the estimate is exceeded.n < 0 inserts a default growable capacity (16 bytes).
Tag buffer with the given tagged fields. Count, tag numbers, and payloadsizes are plain unsigned varints (not compact +1). Fields are written inascending tag order as the protocol requires; tag numbers must be unique.