Open ricklupton opened 15 hours ago
@Seb-sti1 yes please for opening a pull request to add this.
Based on your version here: https://github.com/Seb-sti1/rmscene/commit/9505d1db55c48890953acfe65f22fabc26e823a2
I think the check for bytes_remaining_in_block
should be in SceneInfo.from_stream
rather than in read_two_int
for consistency with the other methods.
And maybe read_int_pair
would be a better name but I don't really mind.
Got it, I'll do that as soon as possible (most likely by the week)
This commit (https://github.com/Seb-sti1/rmscene/pull/1/commits/9505d1db55c48890953acfe65f22fabc26e823a2) is the addition of paperSize in the SceneInfo class
On the files that had excess bytes, they were
92, 8, 0, 0, 0, 124, 5, 0, 0, 80, 7, 0, 0
which seems to correspond to :92 = 5 (index), 12 (TagType.Length4)
as read and check byDataSteam.read_tag
8, 0, 0, 0
the size 8 bytes here124, 5, 0, 0 = 124 + 5 << 4 = 1404
= first80, 7, 0, 0 = 80 + 7 << 4 = 1872
= secondThe first implementation I tried was with the code below as it seemed to be closer to a simple value but given the existence of what appears to be a size I changed it and used
TaggedBlockReader.read_subblock
. Btw I don't know if it would be better to readsize/4
uint32 instead of the hardcoded two.Originally posted by @Seb-sti1 in https://github.com/ricklupton/rmscene/issues/34#issuecomment-2486829797