Beispiel #1
0
 public TagStream(ulong tagId, StreamSpan stream)
 {
     _stream        = stream.Required();
     _tagId         = tagId.AsILInt();
     _contentLength = ((ulong)_stream.Length).AsILInt();
     _length        = _tagId.Length + _contentLength.Length + _stream.Length;
     _position      = 0;
 }
Beispiel #2
0
 public ReadonlyTagStream(ulong tagId, byte[] bytes)
 {
     _bytes         = bytes ?? Array.Empty <byte>();
     _tagId         = tagId.AsILInt();
     _contentLength = ((ulong)bytes.Length).AsILInt();
     _length        = _tagId.Length + _contentLength.Length + _bytes.Length;
     _position      = 0;
 }
 public void AsILIntILIntDecode(ulong value) => Assert.AreEqual(value, value.AsILInt().ILIntDecode());
Beispiel #4
0
 public byte[] AsILIntToByteArray(ulong value) => value.AsILInt();