Class HuffmanCodec
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
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
GetDecodedLength(ReadOnlySpan<byte>)
Returns the length of the decoded huffman array
public int GetDecodedLength(ReadOnlySpan<byte> encodedBytes)
Parameters
encodedBytes
ReadOnlySpan<byte>
Returns
GetEncodedLength(ReadOnlySpan<byte>)
public int GetEncodedLength(ReadOnlySpan<byte> input)
Parameters
input
ReadOnlySpan<byte>
Returns
Write(Span<byte>, int, Symbol)
Write to a span symbol
public static int Write(Span<byte> buffer, int offsetBits, Symbol symbol)
Parameters
Returns
- int
Returns the number of bits written on the buffer