Powerful Code Decreaser v6.2
Packer at one time was used
for compression of RGB image (. Y). Perhaps they
pack a lot of magazines. Perhaps it is
there appeared a standard tree of 16
options, which subsequently ended up in MS
Pack, Hrum, Hrust ... Not claim
nothing ...
Included with the compressor attached
unpack in the source code. This solves many problems, giving
the opportunity to choose how use the extractor. Unpacking not
optimized, but the presence of the source allows us to solve
this issue.
There is bit and byte streams, bit stream is selected by 2
bytes. To work uses a stack (the principle DJNZ: POP HL: LD B,
C: ADD HL, HL).
Packed block starts with a 5-byte
related to the end of the file, then lay 2
first bytes of the bitstream.
Further, according to the bit stream:
% 1 - just bytes (of a byte stream);
% 000, xxxx - puts = 1. Ultrashort link with
disp = xxxx +1 = 1 .. 16;
001% - puts = 2. Slug, dispL Math
patterns from a byte stream. If -1, then
exit unpacker, otherwise dispL on the unit per unit more than
reading; 010% - puts = 3. Here and below follows:
Thus defined disp: from byte to
current read dispL, and dispH of Bito
flux on a tree:
% 0 - dispH = 0,
% 1000 - dispH = 1,
% 1010 - dispH = 2,
% 1100 - dispH = 3,
% 1110 - dispH = 4,
% 1011000 - dispH = 5,
etc. Codes begin with the unit and have
structure: 2 information bits, 1 bit
terminator (0 = end) and t.d.Do
8 bits dispH. Major drawback - Sauveur
Shannon does not use codes starting with
% 1001 ...
% 01101 - puts = 4;
% 01110 - puts = 5;
% 0111100 - puts = 6;
% 0111101 - puts = 7;
% 0111110 - puts = 8;
011111100% - puts = 9;
011111101% - puts = 10;
011111110% - puts = 11;
01111111100% - puts = 12;
01111111101% - puts = 13;
01111111110% - puts = 14;
01111111111% - puts = 15;
% 01,100 - to take a byte from byte to
current. If 0, then take 2 bytes puts out
byte stream, or puts = byte +15.
Prepared by Coder