splitting binary file into chunks

Dar Scott dsc at swcp.com
Fri Jul 18 16:51:03 EDT 2003


On Friday, July 18, 2003, at 03:25 PM, Kurt Kaufman wrote:

> (1) Open a binary file (generally less than 100KB in size)

put URL "binfile:myfile" into binaryData

> (2) look for specific byte-sequences in that file (using offset? -or  
> is that just for text?)

matchChunk()

I think you can use regex and offset on arbitrary stings.  Test for  
null problems.

> (3) split the data into sections based on location of the  
> byte-sequences in (2)

put char startChar to endChar into ...

> (4) decode the sections determined in (3) and place the (now text)  
> data into fields

binaryDecode()

Dar Scott

************************************************************************ 
****
   Dar Scott Consulting    http://www.swcp.com/dsc/    Programming  
Services
************************************************************************ 
****




More information about the use-livecode mailing list