Table of Contents

Method WriteBlock

Namespace
AvroSharp.Containers
Assembly
AvroSharp.dll

WriteBlock(AvroFileBlock, bool)

Writes a block read from another file (TryReadBlock(out AvroFileBlock?)) after the objects written so far, without decoding its objects. A block compressed with this file's codec is copied byte for byte, unless recompress is set; any other block is decompressed with its codec and compressed with this file's.

public void WriteBlock(AvroFileBlock block, bool recompress = false)

Parameters

block AvroFileBlock

The block.

recompress bool

Whether to decompress and compress the block even when the codecs are the same.

Exceptions

ArgumentException

The block's schema is not this file's: their canonical forms differ.

AvroDataException

The block cannot be decompressed, or decompresses to more than DefaultMaxBlockLength (64 MiB), a reader's default limit.