public BulkReference Write(byte[] bytes) { var numBytes = bytes.Length; _binaryWriter.Write(bytes, 0, numBytes); var bulkRef = new BulkReference(_offset, numBytes); _offset += bytes.Length; return bulkRef; }
public byte[] Read(BulkReference bulkReference) { _binaryReader.BaseStream.Seek(bulkReference.ByteOffset, SeekOrigin.Begin); return _binaryReader.ReadBytes(bulkReference.NumBytes); }