private void WriteHeader(BinaryWriter writer, long length, long valueLength, VersionDataType binary, string key) { var header = new VersionHeader { Length = (ushort)length, ValueLength = (ushort)valueLength, Type = binary }; writer.WriteStruct(header); writer.WriteUnicodeString(key); writer.Align(); }