Skip to content

Align the chunk size in the header of the CPR with the actual chunk size (issue #12)#16

Open
ColinPitrat wants to merge 1 commit intollopis:mainfrom
ColinPitrat:issue12
Open

Align the chunk size in the header of the CPR with the actual chunk size (issue #12)#16
ColinPitrat wants to merge 1 commit intollopis:mainfrom
ColinPitrat:issue12

Conversation

@ColinPitrat
Copy link
Copy Markdown

The CPR doesn't work in some emulators because it is invalid. It advertises a chunk size of 16kB in the header, but the chunk is actually 20 bytes shorter (the size of the CPR + chunk header).

That's because the PAD_TO_16K applies to the whole output: CPR header + content. There are two options:

  • modify the size in the header to remove 20 bytes (i.e. 3FEC instead of 4000)
  • make the final size 16k + 20 bytes, this is the solution I chose

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant