[CrashCourse CS] #20 Files & File Systems

Steve·2021년 6월 16일
0
post-custom-banner

File formats

Files are just a huge list of numbers, stored as binary.

Text, or TXT - Stores text

Interpret data with each coordinating ASCII.

Wave, or WAV - Stores audio

First 44 bytes of WAV file:

Before we can correctly read the data, we need to know some information, like the bit rate and whether it's a single track or stereo. Data about data is called metadata.

Metadata is stored at the front of the file, ahead of any actual data, in what's known as header.

Digital microphone samples the sound pressure thousands of times.

Each sample can be represented as a number. Larger numbers mean higher sound pressure, what's called amplitude.

When it's time to play this file, an audio program needs to actuate the computer's speakers such that the original waveform is emitted.

Bitmap, or BMP - store pictures.

On a computer, pictures are made up of little tiny square elements called pixels.
Each pixel is a combination of three colors: red, green and blue. These are called additive primary colors, and they can be mixed together to create any other color on our electronic displays.


Modern file systems...

  1. Store files in blocks.
  2. Allow files to be broken up into chunks and stored across many blocks.

Extra space is called slack space.

Most often, directory file is kept right at the front of storage, so we always know where to access it (location zero). It is like a table of contents in a book.

The directory file and the maintenance of it is an example of a very basic File System, the part of an operating system that manages and keep track of stored files.

Deleting data - Just remove the entry from the directory file, and at some point, the block will be overwritten with new data.

  • This is one way that computer forensic team can recover data from computers.

Fragmentation - Files getting broken up across storage.

Degragmentation - The computer copies around data so that files have blocks located together in storage and in the right order.

Hierarchical File Systems - many folders and subfolders.
Metadata for knowing if it is a directory - isDirectory? true or false

Top-most directory file is called root directory. All other files and folders lie beneath this directory along various file paths.

Vocabulary

  • crafy - If you describe someone as crafty, you mean that they achieve what they want in a clever way, often by deceiving people. (=cunning) 교활한.
  • technobabble - (보통 사람들은 이해하기 힘든) 컴퓨터 및 최신 과학 기술 관련 용어들

Thoughts

  • 영상이든 3D 모델링이든 뭐든 다 무수한 0 과 1의 조합인데, 단순히 데이터 뿐만 아니라 데이터에 관한 데이터도 들고 있다는 것을 배웠다. 모든 것이 0 과 1로 표현될 수 있다는게 신기하다.
profile
게임과 프론트엔드에 관심이 많습니다.
post-custom-banner

0개의 댓글