public Internal(byte[] bytes, Database database) : base(database) { short type = BitConverter.ToInt16(bytes, 8); if (type != (short)LobStructureType.INTERNAL) throw new ArgumentException("Invalid byte structure. Expected INTERNAL, found " + type); BlobID = BitConverter.ToInt64(bytes, 0); MaxLinks = BitConverter.ToInt16(bytes, 10); CurLinks = BitConverter.ToInt16(bytes, 12); Level = BitConverter.ToInt16(bytes, 14); DataSlotPointers = new InternalLobSlotPointer[CurLinks]; short offset = 16; for (short i = 0; i < CurLinks; i++) { DataSlotPointers[i] = new InternalLobSlotPointer(bytes.Skip(offset).Take(16).ToArray()); offset += 16; } }