Table of Contents

Class HuffmanCodec

Namespace
Fluxzy.Clients.H2.Encoder
Assembly
Fluxzy.Core.dll
public class HuffmanCodec
Inheritance
HuffmanCodec
Inherited Members

Constructors

HuffmanCodec()

public HuffmanCodec()

Methods

Decode(ReadOnlySpan<byte>, Span<byte>)

buffer is used to encode the result

public Span<byte> Decode(ReadOnlySpan<byte> memoryInput, Span<byte> buffer)

Parameters

memoryInput ReadOnlySpan<byte>
buffer Span<byte>

Returns

Span<byte>

Encode(ReadOnlySpan<byte>, Span<byte>)

buffer is used to encode the result

public Span<byte> Encode(ReadOnlySpan<byte> input, Span<byte> buffer)

Parameters

input ReadOnlySpan<byte>
buffer Span<byte>

Returns

Span<byte>

GetDecodedLength(ReadOnlySpan<byte>)

Returns the length of the decoded huffman array

public int GetDecodedLength(ReadOnlySpan<byte> encodedBytes)

Parameters

encodedBytes ReadOnlySpan<byte>

Returns

int

GetEncodedLength(ReadOnlySpan<byte>)

public int GetEncodedLength(ReadOnlySpan<byte> input)

Parameters

input ReadOnlySpan<byte>

Returns

int

Write(Span<byte>, int, Symbol)

Write to a span symbol

public static int Write(Span<byte> buffer, int offsetBits, Symbol symbol)

Parameters

buffer Span<byte>
offsetBits int
symbol Symbol

Returns

int

Returns the number of bits written on the buffer