12.07.2015 Views

Data Compression: The Complete Reference

Data Compression: The Complete Reference

Data Compression: The Complete Reference

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

1.1 Intuitive <strong>Compression</strong> 19Letters Code Figures Letters Code FiguresA 10000 1 Q 10111 /B 00110 8 R 00111 -C 10110 9 S 00101 SPD 11110 0 T 10101 naE 01000 2 U 10100 4F 01110 na V 11101 'G 01010 7 W 01101 ?H 11010 + X 01001 ,I 01100 na Y 00100 3J 10010 6 Z 11001 :K 10011 ( LS 00001 LSL 11011 = FS 00010 FSM 01011 ) CR 11000 CRN 01111 na LF 10001 LFO 11100 5 ER 00011 ERP 11111 % na 00000 naLS, Letter Shift; FS, Figure Shift.CR, Carriage Return; LF, Line Feed.ER, Error; na, Not Assigned; SP, Space.Table 1.4: <strong>The</strong> Baudot Code.<strong>The</strong> 9/19/89 SyndromeHow can a date, such as 11/12/71, be represented inside acomputer? One way to do this is to store the number ofdays since January 1, 1900 in an integer variable. If thevariable is 16 bits long (including 15 magnitude bits andone sign bit), it will overflow after 2 15 =32K =32,768days, which is September 19, 1989. This is precisely whathappened on that day in several computers (see the January,1991 issue of the Communications of the ACM). Noticethat doubling the size of such a variable to 32 bitswould have delayed the problem until after 2 31 = 2 gigadays have passed, which would occur sometime in the fallof year 5,885,416.followed by the 8 bits ASCII code of the character; a total of 12 bits. Each paragraph iscoded separately, and if this results in expansion, the paragraph is stored as plain ASCII.One more bit is added to each paragraph to indicate whether or not it uses compression.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!