In APF files, each line is encoded separately. And in these problematic files there is extra encoded data in the lines. To display these files correctly, you need to initialize a decoder for each line. The compressed size of each line is stored in a directory in the MAIN chunk.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In APF files, each line is encoded separately. And in these problematic files there is extra encoded data in the lines. To display these files correctly, you need to initialize a decoder for each line. The compressed size of each line is stored in a directory in the MAIN chunk.
Do you have documentation of the MAIN chunk? I see four bytes per line, what are they?
http://www.appleoldies.ca/graphics/shr/ft_c0.0002_apple_preferred.pdf
I fixed this now. Thanks a lot for reporting and hints for the fix!