2 * xDMS v1.3 - Portable DMS archive unpacker - Public Domain
3 * Written by Andre Rodrigues de la Rocha <adlroc@usa.net>
12 UWORD
Unpack_QUICK(struct xdms_data
*xdms
, UBYTE
*in
, UBYTE
*out
, UWORD origsize
) {
13 UWORD quick_text_loc
= xdms
->quick_text_loc
;
14 UBYTE
*text
= xdms
->text
;
20 outend
= out
+origsize
;
21 while (out
< outend
) {
24 *out
++ = text
[quick_text_loc
++ & QBITMASK
] = (UBYTE
)GETBITS(8); DROPBITS(8);
27 j
= (UWORD
)(GETBITS(2)+2); DROPBITS(2);
28 i
= (UWORD
)(quick_text_loc
- GETBITS(8) - 1); DROPBITS(8);
30 *out
++ = text
[quick_text_loc
++ & QBITMASK
] = text
[i
++ & QBITMASK
];
34 xdms
->quick_text_loc
= (UWORD
)((quick_text_loc
+5) & QBITMASK
);