문제

Is a computer file just a string of zeroes and ones? If so, can it start with zeroes?

I have not been able to find an answer, surprisingly.

도움이 되었습니까?

해결책

Yes the File has a binary representation and it can start with a leading zero.

To verify this open any file from your computer with an hex editor and modify the leading hex to 00.

You would most likely be unable to open the file, because you damage the signature but it still can be considered a valid file.

다른 팁

The most common type of file is a binary file, which is composed of:

  • A stream of bytes, which can be completely arbitrary.
  • Metadata: name, length, owners, permissions, relevant dates, and so on.

This is the "view" of the file from the outside. From the inside, the file will also be associated with locations on disk. Furthermore, if the filesystem is journaled, recent changes to the file will also be stored.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 cs.stackexchange
scroll top