Sign in to follow this  
Followers 0
typhoon

Little endian conversion

2 posts in this topic

Is there an easy way to read a word/dword value from a file (after opening in binary mode)? It is stored in little-endian so Dec() won't work correctly.

Share this post


Link to post
Share on other sites



@typhoon

Maybe this can get you started.

; little endian decoder
Func LEDec($hexstring)
    Local $output = ""
    For $i = 1 To StringLen($hexstring) Step 2
        $output = StringMid($hexstring,$i,2) & $output
    Next
    Return $output
EndFunc

regards

ptrex

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0