M
Mullin Yu
I have a file, and want to replace some bytes by other bytes e.g.
Old: 1b 25
New: 1b 26 66 31 30 30 59 1b 26 66 58
How to implement? Thanks!
Old: 1b 25
New: 1b 26 66 31 30 30 59 1b 26 66 58
How to implement? Thanks!
Mullin Yu said:I have a file, and want to replace some bytes by other bytes e.g.
Old: 1b 25
New: 1b 26 66 31 30 30 59 1b 26 66 58
How to implement? Thanks!
Mullin Yu said:but, if i read the file byte by byte, how can i know that it's 1b 25???
if i want to have a generic solution, how to handle then?
do i need to convert all the bytes from files to string with delimiter like
1b;25;
1b;26;66;31;30;30;59;1b;26;66;58
then, i can use the string replace function and then convert them to array
and write back to stream.
but, any issue if the file size is very large.