mirror of
https://github.com/aziascreations/PB-MessagePack.git
synced 2026-11-24 18:28:44 +01:00
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:
@@ -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 ! (" +
|
||||
|
||||
Reference in New Issue
Block a user