how to bitwise negate a binary file?

Michael Kann mikekann at yahoo.com
Wed Sep 7 21:42:54 EDT 2011


repeat for each char c in negated_binary_file
put charToNum(c) into x
put numToChar(255-x) after fixed_binary_file
end repeat

--- On Wed, 9/7/11, Matthias Rebbe <matthias_livecode_150811 at m-r-d.de> wrote:

From: Matthias Rebbe <matthias_livecode_150811 at m-r-d.de>
Subject: how to bitwise negate a binary file?
To: "How to use LiveCode" <use-livecode at lists.runrev.com>
Date: Wednesday, September 7, 2011, 5:23 PM

Hi,

i have here some binary files, which were negated bitwise. How can i "convert" them back?
Is there a livecode function i can use?

Or do i have to 
convert the binary file to hex, 
convert each byte to decimal,
convert each "decimal"byte value  with "bitNot",
reconvert to hex and then convert to binary again?

Any ideas?

Regards,

Matthias
_______________________________________________
use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



More information about the use-livecode mailing list