[chunck] [header][data] Header = CCCLLLLL C=chunck type L=Length If header is FF, data end 000: Write the following LLLLL+1 bytes of data 001: Followed by a single byte which is writen LLLLL+1 times 010: Followed by two bytes which are repeated for a total of LLLLL+1 written bytes 011: Followed by a single byte which is written LLLLL+1 times, but it's increased by one after each write 101,110: Unused 111: Signifies 2 bytes: Header is now: [111CCCLL LLLLLLLL] 1=1 C=Chunck header (see above) L=Length