public static Guid ReadUuidProto(this PrimitiveReader reader) { var buf = new byte[16]; reader.ReadFully(buf, 0, 16); Array.Reverse(buf); return(new Guid(buf)); }
internal override void Read(PrimitiveReader reader, int _) { var len = reader.ReadInt(); if (len < 0) { throw new NBTException("Negative length."); } Value = new byte[len]; reader.ReadFully(Value, 0, Value.Length); }
public override void Read(PrimitiveReader reader) { Channel = reader.ReadStringProto(20); Data = new byte[reader.BaseStream.Length]; reader.ReadFully(Data, 0, Data.Length); }