Appendix B: embedded font/picture encoding
SSA’s font and picture file embeddeding is a form of UUEncoding.
It takes a binary file, three bytes at a time, and converts the 24bits of those bytes into four 6-bit numbers. 33 is added to each of these four numbers, and the corresponding ascii character for each number is written into the script file.
The offset of 33 means that lower-case characters cannot appear in the encoded output, and this is why the “filename” lines are always lower case.
Each line of an encoded file is 80 characters long, except the last one, which may be shorter.
If the length of the file being encoded is not an exact multiple of 3, then for odd-number filelengths, the last byte is multiplied by hexadecimal 100, and the most significant 12 bits are converted to two characters as above. For even-number filelengths, the last two bytes are multiplied by hexadecimal 10000, and the most significant 18 bits are converted to three characters as above.
There is no terminating code for the embedded files. If a new [section] starts in the script, or if another filename line is found, or the end of the script file is reached then the file is considered complete.
应该是要求UUE编码