C0 = SLIP frame start/end
00 = Request (B1)
08 = Op (B1)
2400 = Payload length (36 dec) (H2)
00000000 = checksum (I4)
07071220[55 repeated 32dec times] = payload
C0 = SLIP frame start/end

.pack() format string "<BBHI"
< = little endian
B = unsigned char (1 byte)
H = unsigned short (2 bytes)
I = unsigned int (4 bytes)

To validate a SLIP response:
C0 = SLIP frame start/end
01 = Response (B1)
08 = Op (B1)
0200 = Payload length (H2)
07071220 = Value (I4)
0000 = <Length> bytes
C0 = SLIP frame start/end
If invalid, search for next C0 and try again
After validating, discard rest of buffer

pull down RST pin
pull down GPIO0 pin
release up RST pin
release up GPIO0 pin

1) short RST to GND
2) short GPIO0 to GND
3) disconnect RST from GND
4) disconnect GPIO0 from GND

nextreg 168, 1 ; enable GPIO0            
nextreg 2, 128 ; set RST low               
nextreg 169, %100 ; set GPIO0 low                                 
nextreg 2, 0 ; set RST high                                        
nextreg 169, %101 ; set GPIO0 high

is_8285 = (efuses & ((1 << 4) | 1 << 80)) != 0  # One or the other efuse bit is set for ESP8285
return "ESP8285" if is_8285 else "ESP8266EX"

How to save the stub, which is a dict of bytes as a binary file in python:
f = open('..\\..\\diff\_image_rewritten.bin', 'w+b')
binary_format = bytearray(stub["text"])
f.write(binary_format)
f.close()

ESCAPING:
=========
$C0 is replaced by $DB $DC
$DB is replaced by $DB $DD
All lengths are counted for unescaped sequences
