Created
August 11, 2017 01:49
-
-
Save richardlehane/1d65bc106177b71b08b13e58ba97c5a5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// parse FcCompressed (section 2.9.73) | |
func parseFcCompressed(fcData []byte) *fcCompressed { | |
fCompressed := fcData[3]&64 == 64 // check fcompressed value (second bit from lestmost of the last byte in fcdata) | |
fcData[3] = fcData[3] & 63 // clear the fcompressed value from data | |
fc := binary.LittleEndian.Uint32(fcData) // word doc generally uses little endian order (1.3.7) | |
return &fcCompressed{fc: int(fc), fCompressed: fCompressed} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Actually found someone else manually parsing .doc files. Thanks for confirming it's
&64 == 64
for fCompressed. :)