ACNews #18
08 мая 2003

Docs - Mednonogova decompressor based on LZ compression.

<b>Docs</b> - Mednonogova decompressor based on LZ compression.
■ ■ ■ ■ ■ ■ ■ ■ ■ ■

  ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■

Decompressor Mednonogova, used, apparently, in "Black Crow" is 
curious that the bit stream into its format is missing - 
although based on LZ compression. Due to this, there is some 
advantage in speed and a loss in density. 

The text comments: yellow - author, green - are mine.

; Decompressor for v 3.01
; HL-DE-how to
; DLPCB DEFM "v301"

DELPZ PUSH DE

        LD DE, DLPCB

        LD BC, 4

        LDIR

        POP DE
xpD0 LD A, (HL)

        SRL A

        JR NC, xpD1

        CALL xpSUB; short copy

        RRA;% AAAlenB1

        RL B; ^ ^ ^ nopacked

        AND 7
xpM2 JR NZ, xpNex; len <= 9

        LD A, (HL); len> 9

        INC HL
xpNex LD C, (HL); disp (given B)

        INC HL

        PUSH HL

        LD H, D

        LD L, E

        SBC HL, BC

        LD B, 0

        LD C, A
xpM1 INC BC

        INC BC;> = 3

        LDIR

        POP HL

        EX AF, AF '

        JR Z, xpD0

        JR NZ, xpDRR; nocompr 1 .. 7

xpD1 RRA

        JR C, xpZ1

        RRA

        JR C, xpZ2

        JR Z, xpDEND;% xxxxx000

        INC HL
xpDRR LD B, A; nocompr 1 .. 31
xpDL0 LD A, (HL)

        INC HL

        XOR (HL)

        LD (DE), A

        INC DE

        DJNZ xpDL0

        JR xpD0

xpZ2 SRL A;% xxxxx100; repeat

        JR C, xpZ2L

        LD C, A

        XOR A

        EX AF, AF '
xpZ22 INC HL

        PUSH HL

        LD H, D

        LD L, E

        DEC HL

        JR xpM1

xpZ2L CALL xpSUB;% xxxX1100

        RRA; ^

        RL B; 0 / 1

        LD C, (HL)

        JR xpZ22

xpZ1 SRL A;% xxxxxx10

        JR NC, xpTWO

        LD C, A;% xxxxx110; long copy

        INC HL

        LD A, (HL)

        AND # 1F

        LD B, A

        LD A, C

        CALL xpSUB

        OR A

        JR xpM2

xpTWO INC A; two bytes% xxxxx010

        LD C, A; = 1 .. 32

        INC HL

        PUSH HL

        LD H, D

        LD L, E

        SBC HL, BC

        LD C, 2

        LDIR

        POP HL

        JR xpD0

xpDEND LD HL, DLPCB;% xxxxx000

        LD C, 4

        LDIR

        RET

xpSUB EX AF, AF '; Place 3 st.bita current byte in the A'

        LD A, (HL)

        RLCA

        RLCA

        RLCA

        AND 7

        EX AF, AF '

        INC HL

        RET

-------------------------------------------------- 
------------- Did you know that ... 

By volume of 5.25 "and 3.5" floppy disks hold roughly the same 
space - 27.5 cubic centimeters? Dimensions of the first 
carrier, however, is overestimated (in fact it is not a square 
and a few millimmetrov less). The second is - somewhat 
underestimated in one of the measurements (actually 90 x 94 x 
3,25 mm). 




Other articles:

News - back Shaitan, Valera Selev and Nuts!

Thoughts - the ninth of May - Victory Day, and you are waiting for the draft board TOWN!

Docs - Mednonogova decompressor based on LZ compression.

ACEdit - List of Honored Members AC Edit.


Темы: Игры, Программное обеспечение, Пресса, Аппаратное обеспечение, Сеть, Демосцена, Люди, Программирование

Similar articles:
Advertising - Advertisements and announcements ...
Answers - Scorpion, GMX and Sergey Zonov ...
CALL ME - Advertisements and announcements ...

В этот день...   5 May