Made iterations skip only unread fields, Sped up string reads

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-05 12:26:03 +01:00
parent ef5648d26a
commit b50cf2406e
4 changed files with 47 additions and 22 deletions
+3 -9
View File
@@ -73,16 +73,10 @@ Procedure.b MsgPackReadBoolean(*MsgPackData.MsgPackData)
; We don't check if we're 1 byte off the end since the previous check implies it.
If FastPeekA(*MsgPackData\Buffer + *MsgPackData\BufferOffset) = #MsgPack_FormatCode_False
If _MsgPackHasFlag(*MsgPackData, #MsgPack_DataFlags_MoveOffsetAfterRead)
*MsgPackData\BufferOffset = *MsgPackData\BufferOffset + 1
EndIf
_MsgPackMoveOffsetAfterRead(*MsgPackData, 1)
ProcedureReturn #False
ElseIf FastPeekA(*MsgPackData\Buffer + *MsgPackData\BufferOffset) = #MsgPack_FormatCode_True
If _MsgPackHasFlag(*MsgPackData, #MsgPack_DataFlags_MoveOffsetAfterRead)
*MsgPackData\BufferOffset = *MsgPackData\BufferOffset + 1
EndIf
ElseIf FastPeekA(*MsgPackData\Buffer + *MsgPackData\BufferOffset) = #MsgPack_FormatCode_True
_MsgPackMoveOffsetAfterRead(*MsgPackData, 1)
ProcedureReturn #True
Else
Debug("The format code isn't the one for a boolean ! (" +