public ChunkInd(ref ChunkPtr8 c) { Code = (DnaID)c.Code; Length = c.Length; OldPtr = c.UniqueInt1 + c.UniqueInt2 << 32; DnaNR = c.DnaNR; NR = c.NR; }
public ChunkInd(ref ChunkPtr8 c) { Code = (DnaID)c.Code; Length = c.Length; OldPtr = c.UniqueInt1 + ((long)c.UniqueInt2 << 32); DnaNR = c.DnaNR; NR = c.NR; }
// buffer offset util protected int GetNextBlock(out ChunkInd dataChunk, BinaryReader reader, FileFlags flags) { bool swap = false; bool varies = false; if ((flags & FileFlags.EndianSwap) == FileFlags.EndianSwap) { swap = true; } if ((flags & FileFlags.BitsVaries) == FileFlags.BitsVaries) { varies = true; } if (swap) { throw new NotImplementedException(); } dataChunk = new ChunkInd(); if (IntPtr.Size == 8) { if (varies) { ChunkPtr4 c = new ChunkPtr4(reader); dataChunk = new ChunkInd(ref c); } else { ChunkPtr8 c = new ChunkPtr8(reader); dataChunk = new ChunkInd(ref c); } } else { if (varies) { throw new NotImplementedException(); } else { ChunkPtr4 c = new ChunkPtr4(reader); dataChunk = new ChunkInd(ref c); } } if (dataChunk.Length < 0) { return(-1); } return(dataChunk.Length + ChunkUtils.GetOffset(flags)); }
// buffer offset util protected int GetNextBlock(out ChunkInd dataChunk, BinaryReader reader, FileFlags flags) { bool swap = false; bool varies = false; if ((flags & FileFlags.EndianSwap) == FileFlags.EndianSwap) swap = true; if ((flags & FileFlags.BitsVaries) == FileFlags.BitsVaries) varies = true; if (swap) { throw new NotImplementedException(); } dataChunk = new ChunkInd(); if (IntPtr.Size == 8) { if (varies) { ChunkPtr4 c = new ChunkPtr4(reader); dataChunk = new ChunkInd(ref c); } else { ChunkPtr8 c = new ChunkPtr8(reader); dataChunk = new ChunkInd(ref c); } } else { if (varies) { throw new NotImplementedException(); } else { ChunkPtr4 c = new ChunkPtr4(reader); dataChunk = new ChunkInd(ref c); } } if (dataChunk.Length < 0) return -1; return dataChunk.Length + ChunkUtils.GetOffset(flags); }