public long Load(byte[] buffer, long offset) { long length; var new_offset = BufferTools.ReadNumberFromBuffer(buffer, offset, 2, out length); this.buffer = new byte[length]; Array.Copy(buffer, new_offset, this.buffer, 0, length); return(offset + 2 + length); }
public int Load(byte[] buffer, long offset) { long value; BufferTools.ReadNumberFromBuffer(buffer, offset, num_bytes, out value); if (Enum.IsDefined(typeof(CipherTypeEnum), value)) { this.value = (CipherTypeEnum)value; } return(num_bytes); }
public long Load(byte[] buffer, long offset) { return(BufferTools.ReadNumberFromBuffer(buffer, offset, 1, out value)); }