how to bitwise negate a binary file?

Matthias Rebbe matthias_livecode_150811 at m-r-d.de
Thu Sep 8 04:15:38 EDT 2011


Michael,

thanks for your solution. Can´t believe that it is so easy to do that manipulation.
I thought char cannot be used with binary files, but it can. Thanks again.

Regards,

Matthias

Am 08.09.2011 um 03:42 schrieb Michael Kann:

> 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
> _______________________________________________
> 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