/// <summary> /// This method is used to deserialize the GlobalIdTableEntryFNDX object from the specified byte array and start index. /// </summary> /// <param name="byteArray">Specify the byte array.</param> /// <param name="startIndex">Specify the start index from the byte array.</param> /// <returns>Return the length in byte of the GlobalIdTableEntryFNDX object.</returns> public override int DoDeserializeFromByteArray(byte[] byteArray, int startIndex) { int idx = startIndex; this.index = BitConverter.ToUInt32(byteArray, idx); idx += 4; this.guid = AdapterHelper.ReadGuid(byteArray, idx); idx += 16; return(idx - startIndex); }
/// <summary> /// This method is used to deserialize the HashedChunkDescriptor2FND object from the specified byte array and start index. /// </summary> /// <param name="byteArray">Specify the byte array.</param> /// <param name="startIndex">Specify the start index from the byte array.</param> /// <returns>Return the length in byte of the HashedChunkDescriptor2FND object.</returns> public override int DoDeserializeFromByteArray(byte[] byteArray, int startIndex) { int index = startIndex; this.BlobRef = new FileNodeChunkReference(this.stpFormat, this.cbFormat); int len = this.BlobRef.DoDeserializeFromByteArray(byteArray, index); index += len; this.guidHash = AdapterHelper.ReadGuid(byteArray, index); index += 16; return(index - startIndex); }
/// <summary> /// This method is used to deserialize the FileDataStoreObjectReferenceFND object from the specified byte array and start index. /// </summary> /// <param name="byteArray">Specify the byte array.</param> /// <param name="startIndex">Specify the start index from the byte array.</param> /// <returns>Return the length in byte of the FileDataStoreObjectReferenceFND object.</returns> public override int DoDeserializeFromByteArray(byte[] byteArray, int startIndex) { int index = startIndex; this.Ref = new FileNodeChunkReference(this.stpFormat, this.cbFormat); int len = this.Ref.DoDeserializeFromByteArray(byteArray, index); index += len; this.guidReference = AdapterHelper.ReadGuid(byteArray, index); index += 16; this.fileDataStoreObject = new FileDataStoreObject((uint)this.Ref.CbValue); this.fileDataStoreObject.DoDeserializeFromByteArray(byteArray, (int)this.Ref.StpValue); return(index - startIndex); }
/// <summary> /// This method is used to deserialize the Header object from the specified byte array and start index. /// </summary> /// <param name="byteArray">Specify the byte array.</param> /// <param name="startIndex">Specify the start index from the byte array.</param> /// <returns>Return the length in byte of the Header object.</returns> public int DoDeserializeFromByteArray(byte[] byteArray, int startIndex) { int index = startIndex; this.guidFileType = AdapterHelper.ReadGuid(byteArray, index); index += 16; this.guidFile = AdapterHelper.ReadGuid(byteArray, index); index += 16; this.guidLegacyFileVersion = AdapterHelper.ReadGuid(byteArray, index); index += 16; this.guidFileFormat = AdapterHelper.ReadGuid(byteArray, index); index += 16; this.ffvLastCodeThatWroteToThisFile = BitConverter.ToUInt32(byteArray, index); index += 4; this.ffvOldestCodeThatHasWrittenToThisFile = BitConverter.ToUInt32(byteArray, index); index += 4; this.ffvNewestCodeThatHasWrittenToThisFile = BitConverter.ToUInt32(byteArray, index); index += 4; this.ffvOldestCodeThatMayReadThisFile = BitConverter.ToUInt32(byteArray, index); index += 4; this.fcrLegacyFreeChunkList = new FileChunkReference32(); int len = this.fcrLegacyFreeChunkList.DoDeserializeFromByteArray(byteArray, index); index += len; this.fcrLegacyTransactionLog = new FileChunkReference32(); len = this.fcrLegacyTransactionLog.DoDeserializeFromByteArray(byteArray, index); index += len; this.cTransactionsInLog = BitConverter.ToUInt32(byteArray, index); index += 4; this.cbLegacyExpectedFileLength = BitConverter.ToUInt32(byteArray, index); index += 4; this.rgbPlaceholder = BitConverter.ToUInt64(byteArray, index); index += 8; this.fcrLegacyFileNodeListRoot = new FileChunkReference32(); len = this.fcrLegacyFileNodeListRoot.DoDeserializeFromByteArray(byteArray, index); index += len; this.cbLegacyFreeSpaceInFreeChunkList = BitConverter.ToUInt32(byteArray, index); index += 4; this.fNeedsDefrag = byteArray[index]; index += 1; this.fRepairedFile = byteArray[index]; index += 1; this.fNeedsGarbageCollect = byteArray[index]; index += 1; this.fHasNoEmbeddedFileObjects = byteArray[index]; index += 1; this.guidAncestor = AdapterHelper.ReadGuid(byteArray, index); index += 16; this.crcName = BitConverter.ToUInt32(byteArray, index); index += 4; this.fcrHashedChunkList = new FileChunkReference64x32(); len = this.fcrHashedChunkList.DoDeserializeFromByteArray(byteArray, index); index += len; this.fcrTransactionLog = new FileChunkReference64x32(); len = this.fcrTransactionLog.DoDeserializeFromByteArray(byteArray, index); index += len; this.fcrFileNodeListRoot = new FileChunkReference64x32(); len = this.fcrFileNodeListRoot.DoDeserializeFromByteArray(byteArray, index); index += len; this.fcrFreeChunkList = new FileChunkReference64x32(); len = this.fcrFreeChunkList.DoDeserializeFromByteArray(byteArray, index); index += len; this.cbExpectedFileLength = BitConverter.ToUInt64(byteArray, index); index += 8; this.cbFreeSpaceInFreeChunkList = BitConverter.ToUInt64(byteArray, index); index += 8; this.guidFileVersion = AdapterHelper.ReadGuid(byteArray, index); index += 16; this.nFileVersionGeneration = BitConverter.ToUInt64(byteArray, index); index += 8; this.guidDenyReadFileVersion = AdapterHelper.ReadGuid(byteArray, index); index += 16; this.grfDebugLogFlags = BitConverter.ToUInt32(byteArray, index); index += 4; this.fcrDebugLog = new FileChunkReference64x32(); len = this.fcrDebugLog.DoDeserializeFromByteArray(byteArray, index); index += len; this.fcrAllocVerificationFreeChunkList = new FileChunkReference64x32(); len = this.fcrAllocVerificationFreeChunkList.DoDeserializeFromByteArray(byteArray, index); index += len; this.bnCreated = BitConverter.ToUInt32(byteArray, index); index += 4; this.bnLastWroteToThisFile = BitConverter.ToUInt32(byteArray, index); index += 4; this.bnOldestWritten = BitConverter.ToUInt32(byteArray, index); index += 4; this.bnNewestWritten = BitConverter.ToUInt32(byteArray, index); index += 4; this.rgbReserved = new byte[728]; Array.Copy(byteArray, index, this.rgbReserved, 0, 728); index += 728; return(index - startIndex); }