public LayoutMessage(BinaryReader in, Superblock sb, long address) throws IOException {
		in.setOffset(address);
		
		this.m_address = address;
		
		this.m_version = in.readByte();
		
		if(this.m_version < 3) {
			this.m_numberOfDimensions = in.readByte();
			this.m_type = in.readByte();
			
			in.skipBytes(5);
			
			boolean isCompact = (this.m_type == 0);
			if(!isCompact) {
				this.m_dataAddress = ReadHelper.readO(in, sb);
			}
			
			this.m_chunkSize = new int[this.m_numberOfDimensions];
			for(int i=0;i<this.m_numberOfDimensions;i++) {
				this.m_chunkSize[i] = in.readInt();
			}
			
			if(isCompact) {
				this.m_dataSize = in.readInt();
				this.m_dataAddress = in.getOffset();
			}
		} else {
			this.m_type = in.readByte();
			
			if(this.m_type == 0) {
				this.m_dataSize = in.readShort();
				this.m_dataAddress = in.getOffset();
			} else if(this.m_type == 1) {
				this.m_dataAddress = ReadHelper.readO(in, sb);
				this.m_continuousSize = ReadHelper.readL(in, sb);
			} else if(this.m_type == 2) {
				this.m_numberOfDimensions = in.readByte();
				this.m_dataAddress = ReadHelper.readO(in, sb);
				this.m_chunkSize = new int[this.m_numberOfDimensions];
				
				for(int i=0;i<this.m_numberOfDimensions;i++) {
					this.m_chunkSize[i] = in.readInt();
				}
			}
		}
	}