'Returns the number of bytes skipped
Sub SkipNBytes (Input As InputStream, N As Int) As Int
Dim buffer(Min(N, 8000)) As Byte
Dim count As Int
Do While count < N
Dim read As Int = Input.ReadBytes(buffer, 0, Min(buffer.Length, N - count))
If read = -1 Then Return count
count = count + read
Loop
Return count
End Sub