Closes the underlyiing file handle. Renders Region unusable after this.
Returns true if chunk is presented on disk. Positions are region local. I.e. 0..REGION_SIZE
Reads chunk from a file. Chunks positions are region local in range 0..REGION_SIZE. outBuffer should be big enough to store chunk of any size.
Writes chunk at chunkPosition with data blockData to disk. Positions are region local. I.e. 0..REGION_SIZE
A storage for REGION_SIZE^3 offsets on a disk.
Format: Header consists of REGION_SIZE^3 records of 4 bytes. record = position << 8 | (size & 0xFF) where position is the number of first sector and size is the total number of sectors that are used by a chunk. Header is followed by sectors each of size SECTOR_SIZE. 4096
Region files are named like x_y_z.region.