Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Function read_Metadata()
- Dim x As Byte = frmMain.buffer(0)
- Dim last As Integer = 0
- Clear_Bytes(1)
- While x <> 127
- Dim index As Byte = x << 3
- Dim type As Byte = x >> 5
- Select Case type
- Case 0
- Clear_Bytes(1)
- Case 1
- Clear_Bytes(2)
- Case 2
- Clear_Bytes(4)
- Case 3
- Clear_Bytes(4)
- Case 4
- 'Handle string
- Dim lenbytes(1) As Byte
- Array.Copy(frmMain.buffer, lenbytes, 2)
- Array.Reverse(lenbytes)
- Clear_Bytes(2)
- Clear_Bytes(BitConverter.ToInt16(lenbytes, 0) * 2)
- Case 5
- Clear_Bytes(5)
- Case 6
- Clear_Bytes(12)
- Case 7
- Stop
- End Select
- last = type
- x = frmMain.buffer(0)
- End While
- If frmMain.buffer(0) = 127 Then
- Clear_Bytes(1)
- End If
- Return Nothing
- End Function
Add Comment
Please, Sign In to add comment