The Difference Between Binary & Text Files

Ji Kim·2020년 9월 3일
0

Database and Application

목록 보기
1/4

Files

Any files can be categorized into binary or text files

Although the file which appear on the computer may look the same, it differs its type by the way the file is encoded.

While both types of files contain data in series of bites (the binary value of 0 & 1), text files strictly contain the textual content compare to the binary files containing custom data.

Text Files - only textual data
Binary Files - both textual and custom data

Binary Files

  • contain sequence of bytes (8 bits)
  • may include different types of data in same file

When the image viewer renders the image of a flower, the file opened in the text editor displays unrecognizable characters.

However, since the PNG-file format includes the small sections of textual data, some parts of the content is readable text.

Text Files

  • More restrictive than the binary data as it only contains textual data
  • However, is less likely to be corrupted
    - small error in the Binary File leads to an error
    - small error in the Text File may open

Text Files can be categorized to plain text format (.txt) and rich text format (.rtf)

Plain Text Format (.txt)

  • several lines of texts followed by the End of File (EOF) marker which signals the end

Rich Text File (.rtf)

  • similar to plain text format, however includes text styles (i.e. - bold, italic, page format)
profile
if this then that

1개의 댓글

comment-user-thumbnail
2023년 8월 11일

I can say that after I started to work with documents and PDF files more often, I started to think about security way more. Thankfully, it didn't take me long to discover https://pdfleader.com/ and start working with PDF without any complications, and I know for a fact that my data is secure that way.

답글 달기