unpack extracts values of various types from a string based on a format, in this case A4A2A2, and returns them as a list.
A is a space padded sting of bytes, the number after it is the number of bytes in each value.
So this format will return a string of the first 4 bytes (stripping away any trailing spaces if there were any) then the next 2 bytes and then the next 2 bytes.
The end result is identical to the 3 calls to substr, but a bit more concise. | [reply] [d/l] [select] |