I found an error in your doc

BaDanWang-3245 20 Reputation points
2023-03-25T00:56:18.6566667+00:00

https://learn.microsoft.com/en-us/openspecs/office_file_formats/ms-ovba/c375cbf2-b9c6-4594-b064-6dfb830f1851

The size of Data in bytes MUST be CompressedChunk.CompressedChunkHeader.CompressedChunkSize (section 2.4.1.1.4) plus 3.

This should be plus 1.

Office Open Specifications
Office Open Specifications
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Open Specifications: Technical documents for protocols, computer languages, standards support, and data portability. The goal with Open Specifications is to help developers open new opportunities to interoperate with Windows, SQL, Office, and SharePoint.
119 questions
{count} votes

Accepted answer
  1. Tom Jebo 1,906 Reputation points Microsoft Employee
    2023-03-28T18:23:06.54+00:00

    Hi @BaDanWang-3245,

    I was assuming you had implemented and that the results were correct but just wanted to make sure this description error was not, in your opinion, affecting the pseudocode or actual coding. I now agree that you are right. The description is not taking into account that the 2 byte header has been subtracted already.

    The 3 bytes that it includes are the 2 byte header and then just 1 byte since the size was calculated with a difference in addresses which doesn't include the starting byte. So once you remove the size of the header for the chunk, then you still have to include the 1 byte increase to include the starting byte. So I now agree that that description needs to be changed as you mentioned to:

    "The size of Data in bytes MUST be CompressedChunk.CompressedChunkHeader.CompressedChunkSize (section 2.4.1.1.4) plus 1."

    I will file a bug to get the documentation updated.

    Thank you for bringing this to our attention!

    Best regards,
    Tom Jebo
    Microsoft Open Specifications Support

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful