Hi, I've been banging my head with trying to come up with a way on Pascal on how to create a function that saves an array of byte to file while keeping its integrity from the fist to the last byte.
I came up with two ideas, either I save the data to the file in its binary form or I convert the binary to hex then save.
When I need to load, if its hex I can decode and convert it to an array of bytes again.
I'm really stuck, because I looked over alot on the past days and didnt find anything remotely close to it. I've began recently working with Pascal so I'm not that experienced with it.
Going C++ would solve me issue but that is not an option here, I need to do it on Pascal.
So if anyone could come up with a way for me to save the array of bytes then load it again later on I would be really thankful.
I could also use a function to encode/decode the bytes, but i have no clue on how would that work.
This is the array I need to save
hmm: array [0..18954] of BYTE;
I have pretty much no base code cause everything I came up with brings error on the IDE, sorry.