Ma’lumotlarni siqish usullarining asosiy xususiyatlari


Download 1.1 Mb.
bet3/4
Sana26.01.2023
Hajmi1.1 Mb.
#1124502
1   2   3   4
Bog'liq
1-ma\'ruza

Huffman usuli

  • birinchi o’rinda takrorlanuvchi harslarni sanaymiz.
  • So’ng har birining harakteristikasiga qarab binary tree hosil qilamiz.
  • 3 3 2 1 1 1 1 1

‘g’
‘o’
‘ ‘
‘e’
‘s’
‘h’
‘p’
‘r’
Keyin hamma o’ng
Tomondagi rootlani
‘1’ va chap
Tomondagilani esa ‘0’
bn raqamlab chiqamiz.
‘g’ 00
‘o’ 01
‘p’ 1110
‘h’ 1101
‘e’ 101
‘r’ 1111
‘s’ 1100
‘ ‘ 100
natijada 37 bit
1100111 1101111 1000000 1100111 1101111 1000000 1101111 1110000 1101000
1100101 1110010 1110011
Orginal holati 91 bit
Yangi holati esa 37 bit
00 01 1110 1101 101 1111 1100 100
Decoding
00011110110110111111100100
Bitta muammo binary treesiz decodlash
Mumkin emas.

Sеriyalаrni kеtmа-kеt kоdlаsh(RLE)

  • Аlgоritm mоhiyati tаkrоrlаnuvchi bаytlаr kеtmа-kеtliklаri yoki zаnjirlаrini bittа kоdlоvchi bаyt vа ulаrning tаkrоrlаshlаr sоni hisоbigа аlmаshtirishdаn ibоrаt. Mаsаlаn, YYYYYBPPPPB
  • bеrilgаn kеtmа-kеtlik bo’lsin.Uni RLE аlgоritmi yordаmidа siqish nаtijаsidа quyidаgi kеtmаqkеtlikkа egа bo’lаmiz: 4Y1B4P1B Birinchi bаyt tаkrоrlаnuvchi bаytlаr sоnini, ikkinchi bаyt tаkrоrlаnuvchi bаytning o’zini bildirаdi.

Run Length Encodingdan foydalanish.

  • Siqiluvchi ma’lumot: 00000111110010000101
  • 00000111110010000101
  • 5 5 2 1 4 111
  • (0,5) (1,5) (0,2) (1,1) (0,4) (1,1) (0,1) (1,1)
  • 1 2 3 4 5 6 7 8
  • log2 8= log2 2 =3 log2 2 =3 bit

3

Run Length Encodingdan foydalanish.

  • Davomi……
  • (0,101) (1,101) (0,010) (1,001) (0,100) (1,001)
  • (0,001) (1,001)
  • Natija

    01011101001010010100100100011001

Run Length Encodingdan foydalanish.

  • 11111111111111100000000000000000001111
  • (15,1) (19,0) (4,1)
  • (01111,1) (10011,0) (00100,1)

  • Download 1.1 Mb.

    Do'stlaringiz bilan baham:
1   2   3   4




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling