code: func readBufChain(arena *slab.Arena, maxBufSize int, r io.ReaderAt, offset int64,
  	valLength uint32) ([]byte, error) {
  	n := int(valLength)
  	if n > maxBufSize {
  		n = maxBufSize
  	}
  	b := arena.Alloc(n)
  	_, err := r.ReadAt(b, offset)
  	if err != nil {
  		arena.DecRef(b)
  		return nil, err
  	}
  	remaining := valLength - uint32(n)
  	if remaining > 0 {
  		next, err := readBufChain(arena, maxBufSize, r, offset + int64(n), remaining)
  		if err != nil {
  			arena.DecRef(b)
  			return nil, err
  		}
  		arena.SetNext(b, next)
  	}
  	return b, nil
  }
docs: // Helper function to read a contiguous byte sequence, splitting
  // it up into chained buf's of maxBufSize.  The last buf in the
  // chain can have length <= maxBufSize.