Desktop Apps of Word, PowerPoint and Excel use FSSHTTP/B/D protocols to encode files for upload/download requests. I'm writing a decoder like program to extract the files' content from these encoded requests. Protocol FSSHTTP-B is being used to encode files' content and contained within FSSHTTP via 'include' element.
The logic is simple, i collect all the bytes from data elements of type "Object Group Object Data (0x16)" for which both "Object Extended GUID Array Count" and "Cell ID Array Count" are zero. This logic is working awesome for Put Changes (upload) requests in which i simply concat all the data elements found, in the same order as they come.
But having issues in download, although above logic extracts file's content successfully but concatenating as they receive doesn't generating a valid file. As office files are ZIP archives of certain XML-files, and if each individual XML file come in a separate data element then rearranging according to central directory also generates a valid file. But most of the times, an individual XML file is further divided into number of data elements and these even doesn't come one-after-other. So, i'm stuck that how to rearrange these data elements to generate a valid .docx/.pptx/.xlsx file? Is there any such info available within the protocol?
I'd gone thru the docs quite deep, also tried to get something useful from GUID and serial number of data elements but no luck. Could anybody please help in this regard. Much thanks in advance.