GZipStream.WriteByte(Byte) Method

Definition

Writes a byte to the current GZip stream and advances the current position within this GZip stream by one.

C#
public override void WriteByte(byte value);

Parameters

value
Byte

A byte to write to the stream.

Remarks

Writing one byte at a time in a loop is less efficient than writing multiple bytes at once. Prefer using the Write(ReadOnlySpan<Byte>) or WriteAsync(ReadOnlyMemory<Byte>, CancellationToken) method for writing multiple bytes at once.

Applies to

Product Versions
.NET 7, 8, 9, 10