writeBlock32 method

int writeBlock32(
  1. Uint8List bs, [
  2. int offset = 0,
  3. int? length
])

Writes a blocks of data using a 32-bit integer as length prefix.

Implementation

int writeBlock32(Uint8List bs, [int offset = 0, int? length]) {
  length ??= bs.length - offset;

  final pos = position;
  bytesIO.ensureCapacity(pos + 4 + length);

  var sz = writeUint32(length);
  writeBytes(bs, offset, length);

  return sz + length;
}