Szerkesztés

Megosztás a következőn keresztül:


BrotliStream.Write Method

Definition

Overloads

Write(ReadOnlySpan<Byte>)

Writes a sequence of bytes to the current Brotli stream from a read-only byte span and advances the current position within this Brotli stream by the number of bytes written.

Write(Byte[], Int32, Int32)

Writes compressed bytes to the underlying stream from the specified byte array.

Write(ReadOnlySpan<Byte>)

Source:
BrotliStream.Compress.cs
Source:
BrotliStream.Compress.cs
Source:
BrotliStream.Compress.cs

Writes a sequence of bytes to the current Brotli stream from a read-only byte span and advances the current position within this Brotli stream by the number of bytes written.

public:
 override void Write(ReadOnlySpan<System::Byte> buffer);
public override void Write (ReadOnlySpan<byte> buffer);
override this.Write : ReadOnlySpan<byte> -> unit
Public Overrides Sub Write (buffer As ReadOnlySpan(Of Byte))

Parameters

buffer
ReadOnlySpan<Byte>

A region of memory. This method copies the contents of this region to the current Brotli stream.

Remarks

Use the CanWrite property to determine whether the current instance supports writing. Use the System.IO.Compression.BrotliStream.WriteAsync method to write asynchronously to the current stream.

If the write operation is successful, the position within the Brotli stream advances by the number of bytes written. If an exception occurs, the position within the Brotli stream remains unchanged.

Applies to

Write(Byte[], Int32, Int32)

Source:
BrotliStream.Compress.cs
Source:
BrotliStream.Compress.cs
Source:
BrotliStream.Compress.cs

Writes compressed bytes to the underlying stream from the specified byte array.

public:
 override void Write(cli::array <System::Byte> ^ buffer, int offset, int count);
public override void Write (byte[] buffer, int offset, int count);
override this.Write : byte[] * int * int -> unit
Public Overrides Sub Write (buffer As Byte(), offset As Integer, count As Integer)

Parameters

buffer
Byte[]

The buffer containing the data to compress.

offset
Int32

The byte offset in buffer from which the bytes will be read.

count
Int32

The maximum number of bytes to write.

Exceptions

The write operation cannot be performed because the stream is closed.

Applies to