Export (0) Print
Expand All

4.1.10.6.18 DecompressReplyMessage

 procedure DecompressReplyMessage(
   msgOut: DRS_MSG_GETCHREPLY,
   dwOutVersion: DWORD): DRS_MSG_GETCHGREPLY_NATIVE

Informative summary of behavior: Compression subdivides a data stream into sequences of bytes called compression chunks. The DecompressReplyMessage procedure decompresses the data stream.

  
 pInBuffer: sequence of BYTE
 pOutBuffer: sequence of BYTE
 cbInBufferCompress: DWORD
 cbInBufferDeCompress: DWORD
  
 if (dwOutVersion = 2) or
    (dwOutVersion = 7) then 
   /* decompress data that is compressed.
    */
   if (dwOutVersion = 2) then
     pInBuffer := msgOut.V2.CompressedV1.pbCompressedData
     cbInBufferCompress := msgOut.CompressedV1.cbCompressedSize
     cbInBufferDeCompress := msgOut.CompressedV1.cbUncompressedSize
     compressionAlg := DRS_COMP_ALG_MSZIP
   else if (dwOutVersion = 7) then
     pInBuffer := msgOut.V7.CompressedAny.pbCompressedData
     cbInBufferCompress := msgOut.V7.CompressedAny.cbCompressedSize
     cbInBufferDecompress := 
       msgOut.V7.CompressedAny.cbUncompressedSize
     compressionAlg := msgOut.V7.CompressionAlg
   endif
  
   DecompressMessage(pInBuffer, cbInBufferCompress, cbOutBufferCompress, 
                     compressionAlg, pOutputBuffer)
  
   /* pOutputBuffer now has the uncompressed data that was derived by
    * serializing a DRS_GETCHGREPLY structure at the server. 
    * Convert the serialized data back to DRS_GETCHGREPLY structure.*/
   if dwOutVersion = 2 then
     dwOutVersion := 1
   else
     dwOutVersion := msgOut.V7.dwCompressedVersion
   endif
   msgOut := Unpickling of data in pOutBuffer of length cbOutBuffer,
             as specified by [C311] Part 2, "IDL/NDR Pickles", and 
             [MS-RPCE] sections 2.2.6 and 2.2.7, "Type Serialization
             Version 1" and "Type Serialization Version 2"
  
 endif
  
 return GetNCChangesNativeReply(msgOut, dwOutVersion)
Show:
© 2016 Microsoft