MRCI Fn 0020H: Incrementally Decompress Data

                                                         Compatibility: 6.0+ 
 Expects: AX    0020H
          CX    caller type: 0000H=APPLICATION client (InDOS is clear)
                             0001H=SYSTEM client      (InDOS is set)
          DS:SI address of a pre-filled MRCRequestRec structure:
                  .pfbSrc  =address of compressed data
                  .wSrcLen =(ignored)
                  .pfbDest =start of buffer (first call)
                            next addr in buffer (subsequent calls;
                            automatically updated by server)
                  .wDestLen=desired number of bytes to decompress on this
                            call (see below).
                  .lIncInfo=must be 0 on the first call.  It is updated
                            by the server automatically on each call.
          ES:BX address of a MRCInfoRec structure filled via INT 2fH 4a12H
          ──────────────────────────────────────────────────────────────────
 Returns: AX    0000H = success
                else  = MRCI API Error Code
          DS:SI wDestLen field (offset 0eH) is size of uncompressed data
          ──────────────────────────────────────────────────────────────────
    Info: This fn decompresses data that was compressed via MRCI Fn 0001H
          (MRCI compress data).  It lets you decompress just a portion of
          the source data; for instance, DoubleSpace uses this to
          decompress individual sectors while accessing CVF disk data in
          larger (up to 8K) cluster blocks.

          The source and destination addresses (and other important
          details) are identified in the MRCRequestRec structure.  The API
          entry address is obtained via INT 2fH 4a12H.

          Before using this call, you must ensure the correct state of the
          InDOS Flag (corresponding to the value in CX) and you must start
          a Windows Critical Section.  See MRCI Fn 0001H for info about
          these requirements.

          MRCReqestRec fields:
   pfbSrc On the first call, set this to the address of the start of a
          compressed block.  MRCI will expect this to begin with a four-
          byte header such as 'MD0' (4DH, 44H, 00H, 02H) or 'DS0' (44H,
          53H, 00H, 02H); the latter is seen in the Sector Heap of
          DoubleSpace CVFs.

          After each call, MRCI updates the offset portion of this field to
          indicate the next address in the source buffer that is to be
          decompressed.  Do not change this field between calls to this fn.

  wSrcLen is ignored in this call.  The amount of data to be decompressed
          is determined by the wDestLen field.

  pfbDest On the first call, set this to the address of the start of your
          buffer to receive the decompressed data.

          After each call, MRCI updates the offset portion of this field to
          indicate the next, unused address in the destination buffer.
          MRCI uses previously-decompressed data as it decompresses each
          new byte of the compressed data, so do not change this field
          between calls to this fn.

 wDestLen is the desired length of the data after decompression; i.e., the
          number of bytes to store into the destination buffer.

          MRCI does not know when it has reached the end of the valid
          compressed data and will happily continue "decompressing"
          garbage.  If you don't know the size the data should be after
          decompression, you can try decompressing one byte at a time, and
          look for some recognizable end of file mark.  In some cases, MRCI
          will know that it is trying to decompress garbage, and will
          return an error in AX; but you cannot depend on that.

 lIncInfo must be set to 0 on the first call.  Thereafter, MRCI uses it to
          maintain state information between calls.  Do not modify this
          between calls to this fn.

   Notes: ■ Check AX for a returned error code.  And check the wDestLen
            field of the MRCRequestRec structure to see if all of the
            requested data was returned.

          ■ See MRCI Fn 0002H (decompress data) for related information.

See Also: MRCI API
          DoubleSpace Overview
          DoubleSpace API
          INT 2fH: Multiplex Interrupt
          DOS Functions
                                    -♦-