filesize increase = 2 * data increase ?
[Prev][Next][Index][Thread]
filesize increase = 2 * data increase ?
Hello,
As some may remember I was working on a (well, sort of) compression routine
for storing the Physics elements. This now works, and I wanted to try wether
it makes any difference. I stumbled on something that puzzles me:
When I add the uncompressed strings (included, see under this mail) this
makes my file 412 bytes bigger. Now how's that? There are 103 elements all
taking up 2 characters, and that adds up to 206 characters. Why does the
file grow with 206*2 bytes?
Similarily, with compression, each character uses 5 bits. this makes
103*2*5=1030 bits, 1030/8 about 130 bytes. But the file grows 262 bytes
(code also included under mail)...
Could someone explain this to me?
Have a Nice Day,
Arnout Engelen
elemdata:
.db "H HeLiBeB C N O "
.db "F NeNaMgAlSiP S Sl"
.db "ArK CaScTiV CrMn"
.db "FeCoNiCuZnGaGeAsSe"
.db "BrKrRbSrY ZrNbMo"
.db "TcRuRhPdAgCdInSnSb"
.db "TeI XeCsBaLaCePr"
.db "NdPmSmEuGdTbDyHoEr"
.db "TmYbLuHfTaW ReOs"
.db "IrPtAuHgTlPbBiPoAt"
.db "RnFrRaAcThPaUNpP"
.db "uAmCmBkCfEsFmMdNoLr",0
.db 0
elemdata:
.db 00111110b, 10001110b, 01000101b, 10100000b, 00100100b, 00001110b,
.db 10000101b, 10100110b, 11101001b, 11011010b, 00101110b, 10011010b,
.db 01000110b, 10000001b, 10000110b, 00000010b, 11100100b, 10000111b,
.db 11101010b, 01011010b, 00010010b, 11000001b, 00010101b, 01101000b,
.db 01000000b, 10010000b, 10100110b, 10001010b, 11101000b, 01010001b,
.db 01100011b, 01001010b, 01000001b, 00111001b, 10101000b, 00010101b,
.db 00110010b, 11010011b, 00000000b, 11000100b, 00000100b, 10100100b,
.db 01000000b, 11000101b, 01010001b, 10001000b, 01100101b, 00011100b,
.db 01101011b, 00110001b, 01101000b, 01011000b, 11101001b, 10001010b,
.db 00110100b, 10001001b, 11011110b, 00110000b, 00011000b, 01000011b,
.db 01000011b, 01100100b, 11011001b, 00000110b, 01100100b, 01000110b,
.db 10101110b, 01000001b, 01001000b, 00100000b, 01011000b, 00000100b,
.db 01000111b, 11000101b, 10100011b, 01111011b, 00100100b, 11000010b,
.db 01010000b, 11000011b, 10011000b, 01000111b, 10000011b, 10111000b,
.db 10010001b, 10011011b, 00110000b, 00010101b, 11010000b, 11100101b,
.db 10011000b, 00101101b, 10101000b, 10010001b, 11010010b, 01000100b,
.db 01011111b, 00110000b, 01010000b, 11100110b, 10011010b, 11011110b,
.db 00010000b, 10100001b, 11101110b, 00000100b, 11100010b, 11010010b,
.db 11000110b, 00100000b, 00000000b, 10100110b, 01110111b, 10000010b,
.db 10011010b, 01101011b, 11011111b, 01000000b, 00110000b, 01001100b,
.db 00001010b, 10000100b, 01010010b, 01001000b, 10101100b, 01100000b,
.db 11011010b, 11100101b, 11000100b, 00000000b, 0
******************************************************************
* To UNSUBSCRIBE, send an email TO: listserv@lists.ppp.ti.com
* with a message (not the subject) that reads SIGNOFF CALC-TI
*
* Archives at http://peach.ease.lsoft.com/archives/calc-ti.html
******************************************************************
Follow-Ups: