BCHByteUtilitiesUtility functions to read and write binary data
val get_aligned_address :
BCHLibTypes.doubleword_int ->
BCHLibTypes.doubleword_intget_aligned_address dw returns the smallest multiple of 16 greater than or equal to the value of dw, represented as a doubleword
val get_1kaligned_address :
BCHLibTypes.doubleword_int ->
BCHLibTypes.doubleword_intget_1kaligned_address dw returns the smallest multiple of 1024 greater than or equal to the value of dw, represented as a doubleword
val rawdata_to_string :
?markwritten:BCHLibTypes.doubleword_int list ->
string ->
BCHLibTypes.doubleword_int ->
stringval write_xml_raw_data :
CHXmlDocument.xml_element_int ->
string ->
BCHLibTypes.doubleword_int ->
unitwrite_xml_raw_data elt s dw writes byte string s to the xml element elt in the form of sub elements with tag aline and attributes bytes and print that contain 4 space-separated groups of 4 bytes in hexadecimal and a print represenation of those 16 bytes, respectively.
This format is used in saving binary content of the sections to xml.
val write_doubleword_to_bytestring : BCHLibTypes.doubleword_int -> stringwrite_doubleword_to_bytestring dw writes the constituting four bytes to a bytestring, least significant byte first.
write_hex_bytes_to_bytestring s converts the hexadecimal byte representation in s to a string of bytes.
val read_xml_raw_data : CHXmlDocument.xml_element_int -> stringread_xml_raw_data elt reads data written by write_xml_raw_data and returns the original byte string.
byte_string_to_spaced_string s writes the byte string s to hexadecimal bytes separated by spaces.
byte_string_to_printed_string s writes the byte string s to hexadecimal bytes as a continuous string.
val decode_string :
string ->
BCHLibTypes.doubleword_int ->
(string
* BCHLibTypes.doubleword_int
* BCHLibTypes.doubleword_int
* BCHLibTypes.doubleword_int
* int)
list ->
string