Upon IDAT blocks (whilst a flag's set & other properties are initialized) another helper reads & validates a couple bytes describing how the data's compressed (GRUB's support is quite limited) before repeatedly reading a few bits (until one of them's set or an error occurred) branching over 2 of them skipping a few bytes afterwords.
For inflate-stored subblocks it reads a 2byte little-endian length skipping a couple more bytes & copies over that many bytes verbatim.
2/?