|
Hi Dave ,
I could finish my program.
To konw if a descriptor is compressed, i compare values at offset xcc and
x48 in descriptors.
Uncompress the datas was not so difficult i had think(thank?thunk?)
I could find those informations about compressed datas.
Run-length encoding (RLE) eliminates strings of repeated bytes. With the
RLE algorithm, the first byte after the
compression header is a control byte, known as a string control byte (SCB).
The SCB has the format shown below.
+------------------------------------------------------------------------+
¦ SCB Format ¦
+------------------------------------------------------------------------¦
¦ ¦ Bit ¦ Content ¦
+------------------------------------------------------------------------¦
+------------------------------------------------------------------------¦
¦ ¦ 0-1 ¦ SCB type: ¦
+-------+-----+----------------------------------------------------------¦
¦ ¦ ¦ 00 ¦ Raw data: the following bytes are uncompressed. ¦
¦ ¦ ¦ ¦ The Count field (bits 2-7) indicates the number of ¦
¦ ¦ ¦ ¦ uncompressed bytes. If the RU is not exhausted, ¦
¦ ¦ ¦ ¦ another SCB follows n+1 bytes after this SCB. ¦
+-------+-----+----+-----------------------------------------------------¦
¦ ¦ ¦ 01 ¦ Reserved ¦
+-------+-----+----+-----------------------------------------------------¦
¦ ¦ ¦ 10 ¦ Master-character: the Count field indicates the ¦
¦ ¦ ¦ ¦ number of space (X'40') characters compressed. If ¦
¦ ¦ ¦ ¦ the RU is not exhausted, another SCB follows this ¦
¦ ¦ ¦ ¦ master-character SCB. ¦
+-------+-----+----+-----------------------------------------------------¦
¦ ¦ ¦ 11 ¦ Duplicated-character: the character (called the ¦
¦ ¦ ¦ ¦ duplicated character, or DC) that follows this SCB ¦
¦ ¦ ¦ ¦ appears in the raw data in an n-byte run; the ¦
¦ ¦ ¦ ¦ n-byte run is compressed to this SCB-DC pair. If ¦
¦ ¦ ¦ ¦ the RU is not exhausted, another SCB follows this ¦
¦ ¦ ¦ ¦ SCB-DC pair. ¦
+------------------------------------------------------------------------¦
+------------------------------------------------------------------------¦
¦ ¦ 2-7 ¦ Count: indicates the number (n), in binary, of ¦
¦ ¦ ¦ uncompressed bytes that follow (in the case of SCB type ¦
¦ ¦ ¦ 00) or that should be generated upon decompression of ¦
¦ ¦ ¦ this SCB sequence. ¦
+------------------------------------------------------------------------+
--------------------------------------------------------------------------
SCBs cannot span RUs. In short:
If the last SCB in an RU is a raw-data SCB, then all of the raw data to
which it refers must be in that RU.
The master-character SCB is allowed to be the final byte in an RU.
If the duplicate-character SCB is the last SCB in the RU, then that SCB
is always the next-to-last byte in the RU,
the last byte being the DC.
Thanks a lot.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.