here i have confusion in output of CRC16.
Here first i used only one function which using char readChar
and counts CRC16 of any type of file but in .tar or .tar.gz
files i got some problem regarding EOF
and in my previous question some one suggested me use int
instead of char
in declartion of readChar
.
So After this i got solution of EOF
in while loop and its read proper bytes.
Than After here i put two methods for calculating CRC16.
In first one i used int readChar
and in second one i used char readChar.
So i got different out for same file this problem i am getting in .tar and .tar.gz
files only. In simple .txt
files this both methods gives same result.