combining Yenc files into 1 file
Hay guys, I'm writing a PHP application to take a NZB file, grab the Yenc files from that, download them, then combine them, then decode them back into binary state.
I've managed th开发者_如何学Ce first part, but I'm having trouble combining the Yenc files back into 1 Yenc file.
any ideas?
Thanks
Have you looked at yEnc PHP Class? That should handle your decoding problem?
If the only problem remaining is combining the parts, have you tried a simple binary-safe append?
Answering a very old post, but it may help others.
Once you have all the parts of the file decoded, you just need to merge the raw bytes together.
So in sudo code:
byte[] file1Decoded byte[] file2Decoded
byte[] completeFile = file1Decoded + file2Decoded
精彩评论