37 lines
834 B
C#
37 lines
834 B
C#
using skyscraper5.Skyscraper.IO;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace skyscraper8.Ietf.FLUTE
|
|
{
|
|
internal class FecHeader
|
|
{
|
|
public FecHeader(MemoryStream ms, byte codepoint)
|
|
{
|
|
switch (codepoint)
|
|
{
|
|
case 0:
|
|
SourceBlockNumber = ms.ReadUInt16BE();
|
|
EncodingSymbolId = ms.ReadUInt16BE();
|
|
break;
|
|
case 129:
|
|
SourceBlockNumber = ms.ReadUInt32BE();
|
|
SourceBlockLength = ms.ReadUInt16BE();
|
|
EncodingSymbolId = ms.ReadUInt16BE();
|
|
break;
|
|
default:
|
|
throw new NotImplementedException(String.Format("Unknown ALC CodePoint value {0}", codepoint));
|
|
}
|
|
|
|
}
|
|
|
|
public ushort? SourceBlockLength { get; set; }
|
|
|
|
public uint SourceBlockNumber { get; }
|
|
public ushort EncodingSymbolId { get; }
|
|
}
|
|
}
|