ASCII, compression

최종윤·2023년 5월 7일
0
  • ASCII
    7bit 로 이루어져 character를 binary string으로 mapping 하는데 사용한다.
    extended ASCII는 8bit를 사용하고 더 많은 character를 binary string으로 mapping한다.
  • Unicode
    8bit까지는 character를 ASCII와 동일한 binary string으로 mapping한다. ASCII의 extended 버전
    국제적 사용을 위해 더 많은 문자를 mapping하기 위해 , (다른나라 언어를 mapping하기 위해) 16bit로 character를 mapping한다.

Text Compression

keyword encoding

많이 사용되는 단어를 *&%와 같은 사용되지 않는 하나의 문자로 mapping하여 전달해야하는 문자의 양을 압축한다.
the = % that = $ 등으로 mapping한다.
"the that" = "% $"
compression ratio = 3/8
compression ratio = origianl characters/encoded characters

Run-Length encoding

특정 문자가 반복되서 사용될때 압축한다.
"nnnnnn kkkk jjj" = "$n6 $k4 jjj"와 같이 encoding한다 . jjj의 경우 글자가 3개 반복되는데 encoding해도 문자의 수가 그대로이므로 encoding하지 않는다.
압축된 문자열이 나올거라는 신호를 보여주는flag인 $과 같은 특정 문자와 반복되는 문자와 반복된 횟수로 나타낸다.

huffman encoding

x, z같은 잘 안 나오는 character는 긴 binary string으로 mapping하고 i,e,a,o,u같은 자주 나오는 문자는 짧은 binary string으로 mapping하여 encoding한다,

audio

Sampling: periodically measure the voltage
Quantization: represent the voltage as a number
using a finite number of bits
sampling과 Quantization을 이용해 compression을 한다. bit stream으로 나타내지는데 huffman encoding을 이용해 추가로 compression을 한다.
파일 형식은 MP3(MPEG-2,3)가 많이 쓰인다. 사람이 들을수 없는 데이터는 버린다.

image

Color depth
The amount of data that is used to represent a color
HiColor
A 16-bit color depth: five bits used for each number
in an RGB value with the extra bit sometimes used to
represent transparency
TrueColor
A 24-bit color depth: eight bits used for each number
in an RGB value
color 를 나타내는데 사용되는 bit가 몇bit냐 에 따라 용량이 달라진다.

raster graphic

BMP, GIF, PNG, JPEG등이 있다.
pixel의 집합이다 .

vector graphic

SVG가 있는데 ERD가 SVG형식으로 나타내진다.
line이나 geometric objects로 나타낸다.
용량은 작다는 장점이 있지만
실제 세상의 이미지를 나타내는데 좋지 않다.

video

Video CODEC(COmpressor/DECompressor) Methods
used to shrink the size of a movie to allow it to be played on a computer or over a network

temporal compression

If most of an image in two frames has not
changed, don't waste space duplicating
information
두 frame 사이 반복되는 데이터 표현 X

spatial compression

A technique based on removing repetitive information within a frame
한 frame에서 반복되는 데이터 제거

profile
https://github.com/jyzayu

0개의 댓글