Avro C#
Public Types | Public Member Functions | Static Public Member Functions | List of all members
Avro.File.Codec Class Referenceabstract

Base class for Avro-supported compression codecs for data files. Note that Codec objects may maintain internal state (e.g. buffers) and are not thread safe. More...

Inheritance diagram for Avro.File.Codec:
Avro.File.DeflateCodec Avro.File.NullCodec

Public Types

enum  Type { Type.Deflate, Type.Null }
 Codec types More...
 

Public Member Functions

abstract byte [] Compress (byte[] uncompressedData)
 Compress data using implemented codec More...
 
abstract byte [] Decompress (byte[] compressedData)
 Decompress data using implemented codec More...
 
abstract string GetName ()
 Name of this codec type More...
 
abstract override bool Equals (object other)
 Codecs must implement an equals() method More...
 
abstract override int GetHashCode ()
 Codecs must implement a HashCode() method that is consistent with Equals More...
 
override string ToString ()
 Returns name of codec More...
 

Static Public Member Functions

static Codec CreateCodec (Type codecType)
 Factory method to return child codec instance based on Codec.Type More...
 
static Codec CreateCodecFromString (string codecType)
 Factory method to return child codec instance based on string type More...
 

Detailed Description

Base class for Avro-supported compression codecs for data files. Note that Codec objects may maintain internal state (e.g. buffers) and are not thread safe.

Member Enumeration Documentation

◆ Type

enum Avro.File.Codec.Type
strong

Codec types

Enumerator
Deflate 

Codec type that implments the "deflate" compression algorithm.

Null 

Codec that does not perform any compression.

Member Function Documentation

◆ Compress()

abstract byte [] Avro.File.Codec.Compress ( byte []  uncompressedData)
pure virtual

Compress data using implemented codec

Parameters
uncompressedData
Returns

Implemented in Avro.File.NullCodec, and Avro.File.DeflateCodec.

◆ CreateCodec()

static Codec Avro.File.Codec.CreateCodec ( Type  codecType)
inlinestatic

Factory method to return child codec instance based on Codec.Type

Parameters
codecType
Returns

◆ CreateCodecFromString()

static Codec Avro.File.Codec.CreateCodecFromString ( string  codecType)
inlinestatic

Factory method to return child codec instance based on string type

Parameters
codecType
Returns

◆ Decompress()

abstract byte [] Avro.File.Codec.Decompress ( byte []  compressedData)
pure virtual

Decompress data using implemented codec

Parameters
compressedData
Returns

Implemented in Avro.File.DeflateCodec, and Avro.File.NullCodec.

◆ Equals()

abstract override bool Avro.File.Codec.Equals ( object  other)
pure virtual

Codecs must implement an equals() method

Parameters
other
Returns

Implemented in Avro.File.DeflateCodec, and Avro.File.NullCodec.

◆ GetHashCode()

abstract override int Avro.File.Codec.GetHashCode ( )
pure virtual

Codecs must implement a HashCode() method that is consistent with Equals

Returns

Implemented in Avro.File.DeflateCodec, and Avro.File.NullCodec.

◆ GetName()

abstract string Avro.File.Codec.GetName ( )
pure virtual

Name of this codec type

Returns

Implemented in Avro.File.DeflateCodec, and Avro.File.NullCodec.

◆ ToString()

override string Avro.File.Codec.ToString ( )
inline

Returns name of codec

Returns

The documentation for this class was generated from the following file: