==================================================
COPY BINARY DATA ('MOVE' BINARY DATA)
- RtlMoveMemory?
- memmove?
Is memmove faster?
- StrPut?
Is StrPut faster? Can AHK's StrPut function be used to move binary data from one location to another, unchanged?
[Note: 'copy' v. 'move'.][RtlCopyMemory v. RtlMoveMemory][memcpy v. memmove]
RtlMoveMemory routine (Windows Drivers)
https://msdn.microsoft.com/en-us/librar ... s.85).aspx
==================================================The RtlCopyMemory routine runs faster than RtlMoveMemory, but RtlCopyMemory requires that the source and destination memory blocks do not overlap.
COMPARE BINARY DATA
- RtlCompareMemory?
- memcmp?
Is memcmp faster?
==================================================
SEARCH BINARY DATA / REPLACE NULLS
E.g. how Notepad opens non-text files: replace null bytes with space bytes, and treat the resulting text as ANSI.
E.g. when creating an hDrop (CF_HDROP), to cut/copy files to the clipboard, or drag-and-drop files to a window: replace LFs with null characters in a LF-delimited list of files.
- InBuf function?
Machine code binary buffer searching regardless of NULL - Scripts and Functions - AutoHotkey Community
https://autohotkey.com/board/topic/2362 ... s-of-null/
InBuf function currently 32-bit only (machine code binary buffer searching) - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=5&t=28393
- repeated NumGet?
- create a RegExMatch 'ANSI' version for AHK Unicode versions?
RegExMatch in AHK Unicode versions can only search for pairs of bytes at even offsets.
- File object?
see: https://autohotkey.com/docs/objects/File.htm
Num := File.ReadNumType()
i.e. Num := File.ReadXXX()
e.g. Num := File.ReadUChar()
==================================================
Note: what if the files you want to binary compare/binary search, are too big to be stored in a variable?
[For a list of RTL functions, go to the link below, and press the down arrow (triangle) at the top.]
Run-Time Library (RTL) Routines (Windows Drivers)
https://msdn.microsoft.com/en-us/librar ... s.85).aspx
[Interesting link. I would read the 'show _ more comment(s)' also.]
windows - Why is RtlFillMemory/RtlCopyMemory defined as macro - Stack Overflow
http://stackoverflow.com/questions/1600 ... d-as-macro
Thanks for reading.