1 instantiation of Header
Microsoft.ML.Data (1)
DataLoadSave\Binary\BinarySaver.cs (1)
544
Header header = new
Header
()
40 references to Header
Microsoft.ML.Data (40)
DataLoadSave\Binary\BinaryLoader.cs (29)
150
_ectx.Assert(metadataTocOffset == 0 ||
Header
.HeaderSize <= metadataTocOffset);
152
_ectx.Assert(
Header
.HeaderSize <= lookupOffset);
261
_ectx.CheckDecode(
Header
.HeaderSize <= offset && offset <= _parent._header.TailOffset - compLen, "block offset out of range");
346
ch.CheckDecode(
Header
.HeaderSize <= blockOffset && blockOffset <= _parent._header.TailOffset,
486
Contracts.Assert(
Header
.HeaderSize <= blockOffset);
674
private readonly
Header
_header;
1029
private unsafe
Header
InitHeader()
1031
byte[] headerBytes = new byte[
Header
.HeaderSize];
1032
int cb = _reader.Read(headerBytes, 0,
Header
.HeaderSize);
1033
if (cb !=
Header
.HeaderSize)
1036
cb,
Header
.HeaderSize);
1038
Header
header;
1041
Marshal.Copy(headerBytes, 0, (IntPtr)(&header),
Header
.HeaderSize);
1047
_host.CheckDecode(header.Signature ==
Header
.SignatureValue,
1054
Header
.VersionToString(header.CompatibleVersion),
Header
.VersionToString(header.Version));
1060
Header
.VersionToString(header.Version),
Header
.VersionToString(ReaderFirstVersion));
1069
Header
.VersionToString(header.CompatibleVersion),
Header
.VersionToString(MetadataVersion));
1074
Header
.VersionToString(header.CompatibleVersion),
Header
.VersionToString(ReaderVersion));
1080
if (header.ColumnCount != 0 && header.TableOfContentsOffset <
Header
.HeaderSize)
1084
if (header.TailOffset <
Header
.HeaderSize)
1088
_host.CheckDecode(tailSig ==
Header
.TailSignatureValue, "Incorrect tail signature");
1129
ch.CheckDecode(
Header
.HeaderSize <= lookupOffset && lookupOffset <= _header.TailOffset - 16 * lookupLen,
1133
ch.CheckDecode(metadataTocOffset == 0 ||
Header
.HeaderSize <= metadataTocOffset && metadataTocOffset <= _header.TailOffset,
2151
Header
header = loader._header;
2226
const long headTailSize =
Header
.HeaderSize + sizeof(ulong);
DataLoadSave\Binary\BinarySaver.cs (10)
419
stream.Write(new byte[
Header
.HeaderSize], 0,
Header
.HeaderSize);
420
ch.CheckIO(stream.Position ==
Header
.HeaderSize);
541
writer.Write(
Header
.TailSignatureValue);
544
Header
header = new Header()
546
Signature =
Header
.SignatureValue,
547
Version =
Header
.WriterVersion,
548
CompatibleVersion =
Header
.CanBeReadByVersion,
554
byte[] headerBytes = new byte[
Header
.HeaderSize];
557
Marshal.Copy(new IntPtr(&header), headerBytes, 0, Marshal.SizeOf(typeof(
Header
)));
DataLoadSave\Transpose\TransposeSaver.cs (1)
179
Marshal.Copy(new IntPtr(&header), headerBytes, 0, Marshal.SizeOf(typeof(
Header
)));