Table of Contents

Class XzCodec

Namespace
AvroSharp.Codecs
Assembly
AvroSharp.Codecs.dll

The xz codec: each block is one XZ stream (LZMA2), with a CRC-64 check as Java's xz codec writes it. Reading accepts every XZ check type.

public sealed class XzCodec : AvroCodec
Inheritance
XzCodec
Inherited Members

Remarks

Uses the fully managed Lzma.Net library. Instances are thread-safe.

Constructors

XzCodec(int)

Creates an xz codec.

Fields

DefaultLevel

The default compression preset, 6, the same as Java's CodecFactory.xzCodec and the xz tool.

Properties

Default

Gets the codec with the DefaultLevel.

Level

Gets the compression preset.

Name

Gets the name written to the file's avro.codec metadata entry, for example deflate.

Methods

Compress(ReadOnlyMemory<byte>, IBufferWriter<byte>)

Compresses one block.

Decompress(ReadOnlyMemory<byte>, IBufferWriter<byte>)

Decompresses one block. The destination refuses to grow past the reader's block limit, so an implementation needs no limit of its own; it should throw InvalidDataException for corrupt data.

ToString()

Returns a string that represents the current object.

See Also