EncodingDefinition Class

Represents an encoding definition used for compression of data. Provides methods for creating and comparing encoding definitions.

Definition

Namespace: SnapDB.Snap
Assembly: SnapDB (in SnapDB.dll) Version: 1.0.102.0 -- Release Build+29075351d0e5aa4dea46a5c520805222f672dc2e
public class EncodingDefinition : IComparable<EncodingDefinition>, 
	IComparable, IEquatable<EncodingDefinition>
Inheritance
Object    EncodingDefinition
Implements
IComparable, IComparableEncodingDefinition, IEquatableEncodingDefinition

Remarks

Serializes as: If Combined KeyValue encoding byte type = 1 Guid KeyValueEncodingMethod If Individual Compression byte type = 2 Guid KeyEncodingMethod Guid ValueEncodingMethod

Constructors

EncodingDefinition(BinaryStreamBase) Initializes a new instance of the EncodingDefinition class from a binary stream.
EncodingDefinition(Guid) Specifies a combined key/value encoding method with the provided Guid.
EncodingDefinition(Stream) Initializes a new instance of the EncodingDefinition class from a regular stream.
EncodingDefinition(Guid, Guid) Initializes a new instance of the EncodingDefinition class with separate key and value encoding methods.

Properties

IsFixedSizeEncoding Gets if the encoding method is the special fixed size encoding method.
IsKeyValueEncoded Gets if the compression method compresses the key and value as a unit.
KeyEncodingMethod Gets the compression method for keys when IsKeyValueEncoded is false. Throws an exception otherwise.
KeyValueEncodingMethod Gets the combined compression method when IsKeyValueEncoded is true. Throws an exception otherwise.
ValueEncodingMethod Gets the compression method if IsKeyValueEncoded is false. Throw an exception otherwise.

Methods

CompareTo(EncodingDefinition) Compares the current object with another object of the same type.
CompareTo(Object) Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
Equals(EncodingDefinition) Indicates whether the current object is equal to another object of the same type.
Equals(Object) Determines whether the specified Object is equal to the current Object.
(Overrides ObjectEquals(Object))
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetHashCode Serves as a hash function for a particular type.
(Overrides ObjectGetHashCode)
GetTypeGets the Type of the current instance.
(Inherited from Object)
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Save(BinaryStreamBase) Serializes the EncodingDefinition to a binary stream.
Save(Stream) Serializes the EncodingDefinition to a regular stream.
ToStringReturns a string that represents the current object.
(Inherited from Object)

Operators

Equality(EncodingDefinition, EncodingDefinition) Checks for equality between two encoding definitions.
Inequality(EncodingDefinition, EncodingDefinition) Checks for inequality between two encoding definitions.

Fields

FixedSizeCombinedEncoding Represents a FixedSize combined encoding method.
FixedSizeIndividualEncoding Represents a FixedSize combined encoding method made up of two individual fixed size IDs. Functionally implemented the same as FixedSizeCombinedEncoding
FixedSizeIndividualGuid The Guid associated with the individual encoding method of a FixedSize

See Also