Skip to content
Advertisement

Reading binary lines not matching file lines after first line

I’m trying to read and print the binary data of a file but notice after reading the first line, with 128 bits, the subsequent lines printed out do not match the lines when I look at the binary data manually with notepad++.

JavaScript

Advertisement

Answer

The problem is that when dc==16 then your program prints whole line but the current x value is skipped (it is not used anywhere). To fix this problem you may remove else like this:

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement