Minecraft wiki entry for History, associated text: Storage version: 1 byte. The least significant bit is used as a flag (which should be zero for the format used in save files), while the remainder is used for the bits per block (i.e. bitsPerBlock = storageVersion >> 1). Valid values are 1, 2, 3, 4, 5, 6, 8 and 16. Used to calculate the number of blocks per 32-bit integer (blocks per word), where blocksPerWord = floor(32 / bitsPerBlock).
The block states as indices into the palette, packed into ceil(4096 / blocksPerWord) 32-bit little-endian unsigned integers. For the blocksPerWord values which are not factors of 32, each 32-bit integer contains two (high) bits of padding. Block state indices are not split across words.
Palette size: A 32-bit little-endian integer specifying the number of block states in the palette.
The specified number of block states in little-endian NBT format, concatenated.