MS Pack 01.96
According to Hrumer'a, author Packers
Hrust, the best compressor texts ZX
until 2000 was MS Pack. It is unfortunate that
Hrumer never wrote articles on
compression and did not answer my questions in person, and yet
his name and the program emerge in this section is not the first
times. However, what is the format of the compressor Microspace?
Extractor, unfortunately, not optimal for
length. The navigation structure amenable to optimization,
extra XOR A, little use conservation HL '... But a decent rate
of decompression - for example, for packaging ROM MS Pack and
today almost irreplaceable. After all, it dictionary, unlike
Hrum, is all length of the file. Of course, it affected the
speed of the packer. Hashing for accelerate the search for
repetitions in no Hrum, either in MS Pack.
There is bit and byte streams, bit stream is selected by 2
bytes. To work uses a stack (the principle ADD HL, HL: DJNZ:
POP HL: LD B, C).
Packaged unit shall lie after
unpacker (Hrum-similar principle). Let us count the bytes from
the beginning unpacker:
+ # E9 - the address to which 5 bytes are con
sample file. More precisely, the address 4, t.k.bayty Mine
ruyutsya through LDDR. Why not 5 bytes are
directly without a pointer? Especially
that 4 bytes (or even 6, if at the end of the de
compressor is not JP, and RET) to the packed
block is not used? If 5 bytes to
ntsa file lying right next depakerom for their
would not have, and to throw! So
this solution the authors rather strange.
+ # Eb - HL 2 bytes to move the packed vannogo block (using
LDDR); + # Ed - 2 bytes DE, similarly;
+ # Ef - 2 bytes of BC, the same;
+ # F1 - address where to unpack (DE ');
+ # F3 - the first 2 bytes of the bitstream.
Further, according to the bit stream:
% 0 - just bytes (of a byte stream);
% 100 - puts = 2. Slug: disp8 in
byte stream (1 .. 256, with 0 resp tstvuet 1 and so on!)
101% - puts = 3;
% 110 - puts = 4;
% 11101 - puts = 5;
% 11110 - puts = 6;
% 1111100 - puts = 7;
% 1111101 - puts = 8;
% 1111110 - puts = 9;
111111100% - puts = 10;
111111101% - puts = 11;
111111110% - puts = 12;
11111111100% - puts = 13;
11111111101% - puts = 14;
11111111110% - puts = 15;
11111111111% - puts = 16;
% 11,100 - to take a byte from byte to
current. If -1, then stop unpacking.
If -2, the next 2 bytes in the byte
stream - it puts, otherwise puts = byte +17 =
= 17 .. 270.
Then for all links, except puts = 2 (for
It was written above mentioned), the following
manner calculated disp (note that in MS
Pack disp unusual - it is subtracted from the
Address-1! That is why in puts = 2 clarified that which
corresponds to!):
% 1 - similarly puts = 2;
% 0000 - dispH = 1, hereafter dispL pregnant tsya from a byte
stream after dispH; % 0001 - dispH = 2;
% 00100 - dispH = 3;
% 00101 - dispH = 4;
% 00110 - dispH = 5;
% 00111 - dispH = 6;
% 010000 - dispH = 7;
% 010001 - dispH = 8;
% 010010 - dispH = 9;
% 010011 - dispH = 10;
% 010100 - dispH = 11;
% 010101 - dispH = 12;
% 010110 - dispH = 13;
% 0101110 - dispH = 14;
% 0101111 - dispH = 15;
% 0110000 - dispH = 16;
...
% 0111110 - dispH = 30;
% 0111111 - dispH from a byte stream.
Prepared by Coder