You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Each block is like a "super tile" and contains data of up to 256x256 (= 65536) tiles.
block_index (29 bytes per block)
Brotli compressed data structure
Empty blocks are not stored
For each block block_index contains a 29 bytes long record:
offset
length
type
description
0 + 29*i
1
u8
level
1 + 29*i
4
u32
column/256
5 + 29*i
4
u32
row/256
9 + 29*i
1
u8
col_min (0..255)
10 + 29*i
1
u8
row_min (0..255)
11 + 29*i
1
u8
col_max (0..255)
12 + 29*i
1
u8
row_max (0..255)
13 + 29*i
8
u64
offset of tile_index
21 + 29*i
8
u64
length of tile_index
block
Each block contains data of up to 256x256 (= 65536) tiles.
Levels 0-8 can be stored with one block each. level 9 might contain 512x512 tiles so 4 blocks are necessary.
Each block contains the concatenated tile blobs and ends with a tile_index.
Neither the order of blocks in the file nor the order of tiles in a block matters as long as their indexes are correct.
Note: To efficiently find the block that contains the tile you are looking for, use a data structure such as a "map", "dictionary", or "associative array" and fill it with the data from the block_index.