Ejemplo n.º 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;
 }
Ejemplo n.º 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());
Ejemplo n.º 4
0
 public byte[] AsILIntToByteArray(ulong value) => value.AsILInt();