private void skipBlocks() throws IOException {
        while (available() > 0) {
            int blockMarker = readUShort(1, true);
            switch (blockMarker) {
                case '!':
                    skip(1);
                    skipSubBlocks();
                    break;
                case ',':
                    framesCount++;
                    skipImageBlock();
                    break;
            }
        }
    }